Last active
June 13, 2022 15:41
-
-
Save pointofpresence/74123ec7537179ffc72b9819e51a8e4b to your computer and use it in GitHub Desktop.
Check if string empty
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
| # Empty strings are "falsy" (python 2 or python 3 reference), | |
| # which means they are considered false in a Boolean context, so you can just do this: | |
| if not myString: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment