Please like share and subscribe channel 🙏 for more videos.
Codes:-
#Create a text file using python:-
myobject=open("harish.txt","w")
lines=["Hello how are you\n",
"Iam fine and presently in Jodhpur Raj.\n",]
myobject.writelines(lines)
myobject.close()
myobject=open("harish.txt","r")
str=" "
while str:
str=myobject.readline()
print(str,end=' ')
myobject.close()