What will be the output of the following Python code?
numberGames = {}
numberGames[(1,2,4)] = 8
numberGames[(4,2,1)] = 10
numberGames[(1,2)] = 12
sum = 0
for k in numberGames:
sum += numberGames[k]
print len(numberGames) + sum
What will be the output of the following Python code?
>>>t1 = (1, 2, 4, 3)
>>>t2 = (1, 2, 3, 4)
>>>t1 < t2
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What will be the output of the following Python code?
d = {"john":40, "peter":45}
d["john"]
What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:-1]
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
What will be the output of the following Python code?
>>>my_tuple = (1, 2, 3, 4)
>>>my_tuple.append( (5, 6, 7) )
>>>print len(my_tuple)
What will be the output of the following Python code?
>>>t = (1, 2)
>>>2 * t
What will be the output of the following Python code?
>>>t = (1, 2, 4, 3, 8, 9)
>>>[t[i] for i in range(0, len(t), 2)]
What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:3]
84 videos|19 docs|5 tests
|
84 videos|19 docs|5 tests
|