Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. f = open(filename + '.txt', 'w')
  2. chars_to_replace = ['/', ':', '>', '<', '"', '\\', '|', '?', '*']
  3. for item in input_list:
  4. f.write("%s\n" % item.replace(chars_to_replace, "_"))
  5. f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement