True
KeywordPython 2.0+Beginner
Boolean literal representing true/1
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
Learn by Difficulty
Quick Example
python
result = True print(result) print(type(result)) if result: print("True is truthy")
True is one of Python's two boolean literals. It evaluates as truthy in conditions and equals the integer 1.
Try in PlaygroundTags
languagesyntaxcorebooleandatatype
Related Items
False
Keyword
Boolean literal representing false/0
bool()
Built-in Function
Converts a value to a Boolean (True or False)
not
Keyword
Logical NOT operator; inverts a boolean value
and
Keyword
Logical AND operator; returns True if both operands are true
or
Keyword
Logical OR operator; returns True if at least one operand is true
is
Keyword
Identity operator; tests whether two variables reference the same object