A

Admin • 833.24K Points
Coach

Q. What will be the output of the following Python program?

Code:
def addItem(listParam):
listParam += [1]

mylist = [1, 2, 3, 4]
addItem(mylist)
print(len(mylist))
  • (A) 5
  • (B) 8
  • (C) 2
  • (D) 1
  • Correct Answer - Option(A)
  • Views: 32
  • 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.