GMgKe586q6suSQnyqZLlGCooeWM
Learn To Program
Increase Your Knowlegde and Build Your Skill!
Pages
Home
Me
Search
Friday, December 31, 2010
Reading File In Python
To read a text file, use:
fp = open("file.txt","r");
print fp.read()
For writing to a file, use:
fp = open("data.txt","w");
write("Hello World");
fp.close();
Reading File In Python
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment