list files in directory python


  1. files = os.listdir(path)
  2. for name in files:
  3.  print(name)