Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import argv
- script, filename = argv
- target = open(filename, 'w')
- cow = raw_input("What's your name? ")
- pig = raw_input("How old are ya!? ")
- duck = raw_input("What's your name on reddit? ")
- print "Now I'm going to ask you for three lines."
- line1 = raw_input("line 1: ")
- line2 = raw_input("line 2: ")
- line3 = raw_input("line 3: ")
- print "I'm going to write these to a file."
- target.write(line1)
- target.write("\n")
- target.write(line2)
- target.write("\n")
- target.write(line3)
- target.write("\n")
- target.write("Your name is %r, you are %r years old and your username is %r" % (cow, pig, duck))
- print "And finally, we close it."
- target.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement