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:

  • how to reverse a word in java
  • pass %* as parameter in java
  • python button event
  • python writelines
  • java resize array
  • create a text file in python
  • python with iterare binary
  • pyhon class constructor
  • perl download file ftp
  • perl script for factorial

No comments yet.

Leave a Comment