fileName = "stuff.txt" #insert file name file = open(fileName) #close the file file.close()
with open("sub_ranks.txt", "r+") as f: for line in f: ...