f = open('/content/drive/MyDrive/dj-2021/temp.txt','r') lines = f.readlines() for line in lines: print(line)
with open('/content/drive/MyDrive/dj-2021/temp.txt','r') as >file : for line in file: print(line)