Examveda

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

A. Counter({3: 3, 2: 2, 4: 2})

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

C. Counter({3: 2})

D. Counter({4: 1})

Answer: Option A


This Question Belongs to Python Program >> Dictionary In Python

Join The Discussion

Related Questions on Dictionary in Python