line_by_line

read line by line

f = open("list.txt", "r")
for line in f:
  print(line)
f.close()

개행을 제거 하려면 line.rstrip()

References

Last updated

Was this helpful?