A

Admin • 833K Points
Coach

Q. Predict the output

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) [True, 50, 5, 10] Sum is: 66
  • (D) TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
  • Correct Answer - Option(B)
  • Views: 25
  • Filed under category Python
  • Hashtags:

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.