题海让大学四年没有难题
白天模式登陆

题目详情

单选题 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程序设计(双语)课程封面

学科:Python程序设计(双语)

时间:2025-04-27 07:01:01

Copyright © 2022 津ICP备2021001502号