题目详情
单选题 Which of the following is not a valid way to define a dictionary in Python
A. d = {'foo': 100, 'bar': 200, 'baz': 300}
B. d = dict([ ('foo', 100), ('bar', 200), ('baz', 300) ])
C. d = {} d['foo'] = 100 d['bar'] = 200 d['baz'] = 300
D. d = dict(foo=100, bar=200, baz=300)
E. d = { ('foo', 100), ('bar', 200), ('baz', 300) }

学科:Python程序设计(双语)
时间:2025-04-27 07:01:01
相关题目
相关作业
