# Opening file and reading it f = open("Akash.txt" ,"r") # 1st Argument : "Akash.txt" , 2nd Argument : "r" ,"rb"execute txt file in binary mode. content = f.read() print(content) #for line in f : # It's also execute all lines of txt file # print(line , end="") # print(f.readline(), end="") # .readline is for printing first line of the txt file # print(f.readline()) # now it will print second line of txt file #print(f.readlines()) #it will execute all line of txt file in same line. f.close() # f = open("Akash.txt") # content = f.read(5) # read(5) execute first 5 ccharacter of txt file. # print("1",content) # # content = f.read(57) # read(57) execute character from 5 to 57 . # print("2",content) # f.close()