Skip to content

Instantly share code, notes, and snippets.

@philk
Created January 13, 2015 01:34
Show Gist options
  • Save philk/c858c8c6b10ad4db2227 to your computer and use it in GitHub Desktop.
Save philk/c858c8c6b10ad4db2227 to your computer and use it in GitHub Desktop.
list comprehension
results = []
for dev in devices:
if device_byname in dev:
results.append(dev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment