Skip to content

Instantly share code, notes, and snippets.

@Kamori
Created October 14, 2019 19:17
Show Gist options
  • Save Kamori/90f98d616ec66938d7ca3b87bfe93384 to your computer and use it in GitHub Desktop.
Save Kamori/90f98d616ec66938d7ca3b87bfe93384 to your computer and use it in GitHub Desktop.
Truthy!
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> myval = "test"
>>> if myval != '':
... print("I got here")
...
I got here
>>> if myval:
... print("I got here part 2")
...
I got here part 2
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment