with open("myfile.txt") as file: for line in file: print(line)
file = open('myfile.txt', 'r') for i, line in enumerate(file, start=1): print("Number %s: %s" % (i, line))