Created
July 13, 2021 11:44
-
-
Save codewithpom/3bc37c9ba9f6ebae950b7701201ec9b8 to your computer and use it in GitHub Desktop.
Declare bool in python
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
i_am_programmer = True | |
# The above example creates a variable and assigns it as True | |
i_am_not_a_programmer = False | |
# The above example creates a variable and assigns it as False | |
# or you can do this | |
i_am_programmer = bool(1) # 1 or any number except 0 | |
i_am_not_a_programmer = bool(0) # 0 is the only number which can assign False | |
# Have fun while Programming. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment