Which of the following is NOT a valid way to create a dictionary in Python?
A. my_dict = {1: ‘one’, 2: ‘two’, 3: ‘three’}
B. my_dict = dict(one=1, two=2, three=3)
C. my_dict = {(1, ‘one’), (2, ‘two’), (3, ‘three’)}
D. my_dict = dict([(1, ‘one’), (2, ‘two’), (3, ‘three’)])
Answer:C
Which of the following is NOT a valid way to create a dictionary in Python?
A. my_dict = {1: ‘one’, 2: ‘two’, 3: ‘three’} B. my_dict = dict(one=1, two=2, three=3) C. my_dict = {(1, ‘one’), (2, ‘two’), (3, ‘three’)} D. my_dict = dict([(1, ‘one’), (2, ‘two’), (3, ‘three’)])