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 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....
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? d1 = {"john":40, "peter":45} Page No 40 d2 = {"john":466, "peter":45} d1 == d2 a) True b) False c) None d) Error Answer : b) False...
What will be the output of the following Python code snippet? d = {"john":40, "peter":45} a) “john”, 40, 45, and “peter” b) “john” and “peter” c) 40 and 45 d) d = (40:”john”, 45:”peter”) Answer : Answer: b Explanation: Dictionaries appear in the form of keys and values....
50.5k questions
47.1k answers
240 comments
7.0k users