import osfor f in os.listdir('C:\txtfiles'): if f.endswith('.py'): print "Python file: " + f elif f.endswith('.txt'): print "Text file: " + f
Name (required)
email (will not be published) (required)
Website