What will be the output? d1 = {"john":40, "peter":45} d2 = {"john":466, "peter":45} d1 > d2 a) True b) False c) Error d) None Answer : c) Error...
What will be the output of the following Python code snippet? d1 = {"john":40, "peter":45} d2 = {"john":466, "peter":45} d1 > d2 a) True b) False c) Error d) None Answer : Answer: c Explanation: Arithmetic > operator cannot be used with dictionaries....
What will be the output of the following Python code snippet? d1 = {"john":40, "peter":45} d2 = {"john":466, "peter":45} d1 == d2 a) True b) False c) None d) Error Answer : Answer: b Explanation: If d2 was initialized as d2 = d1 the answer would be true....
What will be the output? d = {"john":40, "peter":45} "john" in d a) True b) False c) None d) Error Answer : a) True...
What will be the output of the following Python code snippet? d = {"john":40, "peter":45} "john" in d a) True b) False c) None d) Error Answer : Answer: a Explanation: In can be used to check if the key is int dictionary....
50.5k questions
47.1k answers
240 comments
7.0k users