Python 3 MCQ (SET-12) – Multiple Choice Questions and Answers
What will be the output after the following statements? x = {‘year’: 2016, ‘month’: ‘March’} x.setdefault(‘day’, ‘Tuesday’) x.setdefault(‘day’, ‘Monday’) print(x) a. (‘day’, ‘Monday’) b. {‘day’: ‘Monday’, ‘month’: ‘March’} c. {‘day’: ‘Tuesday’, ‘month’: ‘March’, ‘year’: 2016} d. {‘day’: ‘Monday’, ‘month’: ‘March’, ‘year’: 2016} What will be the data type of x after the following statement? x … Read more