[Solved] How do I sort a text file by three columns with a specific order to those columns in Python?
Your question is still ambiguous. Your example doesn’t have the first field Team_Name introduced in your header. So the index here is probably off by one, but I think you get the concept: #read lines of text file and split into words lines = [line.split() for line in open(“test.txt”, “r”)] #sort lines for different columns, … Read more