Created
February 10, 2014 17:59
-
-
Save jorendorff/8920940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for line in (line for line in (line.strip() for line in res.out.split('\n')) if line): | |
... | |
for line in filter(bool, (line.strip() for line in res.out.split('\n'))): | |
... | |
for line in filter(bool, map(lambda ln: ln.strip(), res.out.split('\n'))): | |
... | |
for line in res.out.splitlines(): | |
line = line.strip() | |
if line: | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment