Last active
August 29, 2015 14:27
-
-
Save Kenji-H/b36e112f2eb9a6b6eb57 to your computer and use it in GitHub Desktop.
Python snippets
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
# remove empty element from list | |
x = [1,2,3,'',4,5,''] | |
filter(None, x) | |
# path exist check | |
import os | |
os.path.exists('/home/kenjih') | |
# create path string | |
import os | |
os.path.join('home', 'kenji', 'workspace') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment