A
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))
listParam += [1]
mylist = [1, 2, 3, 4]
addItem(mylist)
print(len(mylist))
- Correct Answer - Option(A)
- Views: 32
- Filed under category Python
- Hashtags:
Discusssion
Login to discuss.