Python MCQ Set 1 1. The following piece of code is invalid. True or False? class demo(dict): def __test__(self,key): return [] a = demo() a[’test’] = 7 print(a) a) True b) False AnswerAnswer: b [Reason:] The output of the code is: {‘test’:7}. 2. What is the output of the following code? count={} count[(1,2,4)] = 5…