Code :
print(True+True)
Solution and Explanation :
In Python, True is internally represented as the integer value 1. Therefore, when you use the + operator to add two True values, it's equivalent to adding 1 + 1, which results in 2.
Here's the code and its output:
print(True + True)
Output:
2
0 Comments:
Post a Comment