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
08 Pazartesi Şub 2016
Posted PYTHON PROGRAMMING LANGUAGE
infr=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