fr=open("sample.txt","r")
text =fr.read()
print(text)
fr.close()

output :

hello world 
 have are you 
 ? 

sample is a text file which we want to read
“r” means we want to read data
we use text store all data
and use print to show