test.txt a b c d q 1 w 3 4 5 6 7 1 2 3 4 with open("./test.txt","r") as f : data = f.read().split("\n\n\n\n")