Skip to content

Instantly share code, notes, and snippets.

@j00bar
Created August 20, 2013 18:10
Show Gist options
  • Save j00bar/6285048 to your computer and use it in GitHub Desktop.
Save j00bar/6285048 to your computer and use it in GitHub Desktop.
tif_files = []
for filename in files:
if not filename.endswith('.tif'):
continue
tif_files.append(filename)
# ooooorrrrrr....
tif_files = [filename for filename in files if filename.endswith('.tif')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment