P

Parvesh Kanani • 2.84K Points
Extraordinary

Q. Output of the following python program will be?

Code:
List = [True, 50, 10] 
List.insert(2, 5) 
print(List, "Sum is: ", sum(List))
  • (A) [True, 50, 10, 5] Sum is: 66
  • (B) [True, 50, 5, 10] Sum is: 65
  • (C) TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
  • (D) [True, 50, 5, 10] Sum is: 66
  • Correct Answer - Option(D)
  • Views: 140
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics