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:

  • create a text file in python
  • factorial perl
  • creating new file .txt python
  • python copy a dictionary
  • java code to get all inbox mails of yahoo
  • python command argument
  • factorial program in perl using recursion
  • how to find factorial using recursion in perl examples
  • python with iterare binary
  • perl script for factorial

No comments yet.

Leave a Comment