I recently started programming and I wanted to sort a file, but in the end, this code only returns one line, even though the text file has 65 lines...
f = open(".\\test.txt")
g, u = [], []
a = 0
for i, line in enumerate(f):
a += 1
if i%2 == 0:
g.append(f.readlines()[i])
print(i),
elif i%2 == 1:
u.append(f.readlines()[i])
print(i),
print(u),
print(g)