document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. fobj = open(os.path.join(loc,index.text), “w+”)
  2. /* note: in the above line of code I have used os.path.join to build a path that contains the file name which is a better way of building the file path instead of overloading  “+” operator.*/
  3.  
  4. # saving the index to this index.txt file
  5.  
  6. for index, each in enumerate(files):
  7.     if index != 0:
  8.         fobj.write(str(index)+” ”+ each.split("-")[-1].split(".")[0]+”\\n”)
  9.  
  10. # close the file
  11. fobj.close()
');