Advertisement
Yesideez

Get Directory Contents

Dec 8th, 2022
997
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | Source Code | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import glob
  4.  
  5. lstFiles=glob.glob("*.*")
  6. lstFiles.sort()
  7. if len(lstFiles)>0:
  8.   for i in lstFiles:
  9.     print(f"  {i}")
  10.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement