Examveda

What will be the output of the following Python code snippet?
>>> import collections
>>> a=collections.Counter([3,3,4,5])
>>> b=collections.Counter([3,4,4,5,5,5])
>>> a&b

A. Counter({3: 12, 4: 1, 5: 1})

B. Counter({3: 1, 4: 1, 5: 1})

C. Counter({4: 2})

D. Counter({5: 1})

Answer: Option B


This Question Belongs to Python Program >> Dictionary In Python

Join The Discussion

Related Questions on Dictionary in Python