Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- print "\nNow i'm going to ask you for three lines.\n"
- # Raw_Input asks us for three "lines" and stores them into the variables
- line1 = raw_input('Line 1:')
- line2 = raw_input('Line 2:')
- line3 = raw_input('Line 3:')
- print "I'm going to write these to the file."
- with open('newfile', 'w') as target:
- target.write(line1)
- target.write("\n")
- target.write(line2)
- target.write("\n")
- target.write(line3)
- target.write("\n")
- print "Done writing."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement