with open(fname) as f:
next(f)
for line in f:
#do something
More Related Contents:
- Create or open file in python [closed]
- Find all files in a directory with extension .txt in Python
- open() gives FileNotFoundError/IOError: Errno 2 No such file or directory
- How to open a file for both reading and writing?
- Print string to text file
- Python recursive folder read
- How might I remove duplicate lines from a file?
- Python 32-bit memory limits on 64bit windows
- Writing a list to a file with Python, with newlines
- File read using “open()” vs “with open()” [duplicate]
- How do I create an incrementing filename in Python?
- Python write to a file returns empty file
- pandas to_csv output quoting issue
- Python Pandas: How to read only first n rows of CSV files in?
- How to safely open/close files in python 2.4
- python close file descriptor question
- ValueError : I/O operation on closed file
- Reading a file with a specified delimiter for newline
- How to read a single character at a time from a file in Python?
- How to read lines from a file in python starting from the end
- Undo a file readline() operation so file-pointer is back in original state
- Write file with specific permissions in Python
- Is it possible to get writing access to raw devices using python with windows?
- pickle.load() raising EOFError in Windows
- Saving response from Requests to file
- Treat binary data as a file object?
- Unicode encoding for filesystem in Mac OS X not correct in Python?
- How to insert / retrieve a file stored as a BLOB in a MySQL db using python
- Python – How to check if a file is used by another application?
- how to count the total number of lines in a text file using python