I follow some articles regarding on how to list files in a directory using the below code :
import os, sys
path = "/python 3.6.4"
dirs = os.list(path)
for file in dirs:
print file
Note: The .py file in which the above code is on the same directory as the path. Im running it using a command prompt. Any idea would be much appreciated. Thanks!