Created
December 5, 2021 13:42
-
-
Save hilfritz/9e86f820cbae9a9aee720feb6ad94363 to your computer and use it in GitHub Desktop.
Python Stuff
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
#PYTHON FILTER String LIST VIA LAMBDA | |
list = ["Main.py", "util.py", "Test.py", "Main.java", "Util.java", "Test.java"] | |
#GET ALL FILES ENDING WITH .py | |
allpythonfiles = filter(lambda x: x.endswith(".py"), allfiles) | |
#GET ALL FILES ENDING WITH .java | |
allpythonfiles = filter(lambda x: x.endswith(".java"), allfiles) | |
SEE FOR MAP/FILTER | |
https://book.pythontips.com/en/latest/map_filter.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment