Challenge: change the code so that only .py and .txt files of a given directory are listed. ''' filename_list_given_dir1.py use module glob to list all the filenames of .jpg files or any extension(s) you specify in a given directory ''' import glob import os # all files (split off file names) in a given directory directory = "C:/Temp/*.jpg" # this would give you all files #directory = "C:/Temp/*.*" for path in glob.glob(directory): #print(path) # test # separate path from filename dirname, filename = os.path.split(path) print(filename)

Member Avatar
Member Avatar
+0 forum 14

I saw this segment and I wasn't sure if I was excited or scared... but my feelings were urging more towards fear. I just do not know if it's a good idea to start microchipping people for better intelligence. Especially our children. Are we slowly turning ourselves in robots? As computer geeks with a pulse on modern technology, I wanted to hear your opinion on the way future is heading. Thoughts? Here is video:[Click Here](http://bit.ly/17lz3LO)

Member Avatar
Member Avatar
+0 forum 11

The End.