A Python program I\'m writing is to read a set number of lines from the top of a file, and the program needs to preserve this header for future use. Currently, I\'m doing s
I'm not sure what the Pylint rules are, but you could use the '_' throwaway variable name.
header = '' header_len = 4 for _ in range(1, header_len): header += file_handle.readline()