Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For each member of a list, write it to a separate file, python
- for item in lst:
- for i in range(len(lst)):
- write_to_me = open('list_item_%i.txt' %i, 'w')
- write_to_me.write(item)
- for i, item in enumerate(lst):
- write_to_me = open('list_item_{0}.txt'.format(i), 'w')
- write_to_me.write(item)
- write_to_me.close()
Add Comment
Please, Sign In to add comment