a guest Apr 26th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # ie List is a normal list:
  2. # 104.txt
  3. # 105.txt
  4. # 106.txt
  5. # 107.txt
  6. # 108.txt
  8. # When done with code below should give me 5x files with a .txt extension, ie 104.txt, 105.txt. Can be any file ext.
  10. List = open("64-120/rename.txt")
  11. List2 = (s.strip() for s in List)
  12. # Loop through the list and create a file with item
  13. for item in List2:
  14.     open('64-120/%s.txt'%(item,), 'w')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand