Hello I am trying to read a file in Python 8 lines at a time and use the current 8 lines as str variables
However I am unable to do this correctly and would appreciate any help
with open("test.txt", 'r') as infile:
lines_gen = islice(infile, 8)
for lines in lines_gen:
firstname = str(lines[0])
lastname = str(lines[1])
email = str(lines[2])
...
How can I achieve this
*cheers
And ty for any help