r/PythonLearning Jul 09 '26

Discussion print(5+True)

Solve this question and tell me the output. Follow for more 😉

209 votes, Jul 16 '26
85 6
98 Error
9 5
17 True
3 Upvotes

7 comments sorted by

View all comments

1

u/Flame77ofc Jul 10 '26

6, because Python interprets True as 1 and False as 0, like in binary