Nguyễn Văn Nhật
New member
How do you skip the first line in Python?
Answer
Call next(file) to skip the first line of the file.
Answer
Call next(file) to skip the first line of the file.
- a_file = open(“example_file.txt”)
- next(a_file)
- for line in a_file:
- print(line. rstrip())
- a_file.