ExamVeda
Login
Home
81
What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
print(a.get(1,4))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
82
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
83
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
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
84
What will be the output of the following Python code snippet?
>>>import collections
>>> b=collections.Counter([2,2,3,4,4,4])
>>> b.most_common(1)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
85
What will be the output of the following Python code snippet?
numbers = {}
letters = {}
comb = {}
numbers[1] = 56
numbers[3] = 7
letters[4] = 'B'
comb['Numbers'] = numbers
comb['Letters'] = letters
print(comb)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board