daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2. import subprocess
  3.  
  4. lsOutput = subprocess.check_output(["ls", "-1"])
  5. lsOutputString = lsOutput.decode("utf-8").splitlines()
  6.  
  7. zipString = ".zip"
  8. zipsList = []
  9.  
  10. for filename in lsOutputString:
  11.     if zipString in filename:
  12.         zipsList+=filename
  13.  
  14. print(zipsList)
RAW Paste Data
Top