Skip to content

Instantly share code, notes, and snippets.

@arumoy
Last active June 27, 2018 16:16
Show Gist options
  • Save arumoy/5c801011ed2fc9b7fee30adf5b974301 to your computer and use it in GitHub Desktop.
Save arumoy/5c801011ed2fc9b7fee30adf5b974301 to your computer and use it in GitHub Desktop.
import re
import os
import sys
sa = os.listdir(sys.argv[1])
def show1to5(sl):
for i in range(0, len(sl)):
try:
num = re.search('.+([1-2][0-9]{3})', sl[i]).group(1)
print(sl[i])
except:
pass
show1to5(sa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment