Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: How to Creating a text file with the writelines() method.

Python: How to Creating a text file with the writelines() method.
{filelink=16390}

# Create a file for writing
text_filee = open("test.txt", "w")
# text to write
text = ["Welcom to ",
         "python",
         "cpp",
          "java"]
#write the text in the file
text_filee.writelines(text)
#close the file
text_filee.close()

Users who found this page were searching for:

  • python making a copy of a dictionary
  • how to use csv file in sql query
  • python create text file
  • java code to get all inbox mails of yahoo
  • python with iterare binary
  • how to find factorial using recursion in perl examples
  • how to draw an image in java
  • python button event
  • pass %* as parameter in java
  • javamail move message to folder

No comments yet.

Leave a Comment