Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #====================
- # Title: [TUTORIAL] File Output of a numbered list
- # Description: Find the numbers in a range and output it to a file, along with
- # the sum of those numbers.
- # Author: Stosswalkinator
- # Date: 7/15/2013
- #====================
- lag = []
- str(lag.extend(range(0,100,5)))
- str(lag.extend(range(0,100,7)))
- f = open('C:\Users\user_name\My Documents\python.txt', 'w')
- f.write(str(lag))
- f.write(str(sum(lag)))
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement