Vidyalelo
Python · Q65

MCQs for Python Dictionaries: Exam

Programming · Python · question 65

Q65

What will be the output of the following Python code snippet? total= def insert(items): if items in total: total[items] += 1 else: total[items] = 1 insert('Apple') insert('Ball') insert('Apple') print (len(total))

A.
3
B.
1
C.
2
Answer
D.
0

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board