Explanation: the variable a has tuples enclosed in a list making it a list of tuples.
Problem Solving and Python Programming MCQs | Page - 37
Dear candidates you will find MCQ questions of Problem Solving and Python Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Explanation: for unpacking to happen, the number of values of the right hand side must be equal to the number of variables on the left hand side.
Explanation: tuples can be made keys of a dictionary because they are hashable.
Explanation: dictionaries are created by specifying keys and values.
Explanation: dictionaries appear in the form of keys and values.
Explanation: in can be used to check if the key is int dictionary.
Explanation: if d2 was initialized as d2 = d1 the answer would be true.
Explanation: arithmetic > operator cannot be used with dictionaries.
Explanation: execute in the shell to verify.
Explanation: sets the file’s current position at the offset. the method seek() sets the file’s current position at the offset.
Jump to