document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Import os
  2. #Lets store the location of this directory  to a variable loc
  3. loc =~/Tutorials/Python/bucky_Python_Programming_Tutorials”
  4. #build a list of files from a give directory path and store the list to files variable
  5. files = os.listdir(loc)
  6.  
  7. for index, each in enumerate(files):
  8.     if index != 0:
  9.         print index, each.split("-")[-1].split(".")[0]
  10.  
  11. # the above 3 lines of code will print the file names from the directory,
  12. # alright lets dissect the above 3 lines
');