Step-by-Step Explanation:
✅ Step 1: Understand True + True
In Python, booleans are a subclass of integers:
True is treated as 1
False is treated as 0
So:
Now the expression becomes:
❌ Step 2: Add Integer to List?
This is not allowed in Python. You cannot add (+) an int and a list together.
Result:
This line causes a TypeError:
✅ Correct Answer:
C. Error


0 Comments:
Post a Comment