Created
December 31, 2017 02:07
-
-
Save PortWhisperer/fbfaa0488e05bc609b3dfe13166b1156 to your computer and use it in GitHub Desktop.
pyhelp
This file contains hidden or 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
| >>> k=os.listdir('C:\\') | |
| >>> print [filemame for filename in k if 'Bin' in filename] | |
| Traceback (most recent call last): | |
| File "<input>", line 1, in <module> | |
| NameError: name 'filemame' is not defined | |
| >>> print [filemame for filename in k if 'Bin' in k] | |
| [] | |
| >>> print [k for k in k if 'Bin' in k] | |
| ['$Recycle.Bin'] | |
| >>> print [k for filename in k if 'Bin' in filename] | |
| [] | |
| >>> print [filename for filename in k if 'Bin' in filename] | |
| [] | |
| >>> print [e for e in k if 'Bin' in e] | |
| [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment