把做工程过程中经常用的内容做个记录,如下代码段是关于python中创建关联数组(字典)的代码。 Dictionary with quoted or variable keys d1 = { “name”:“donuts”, “type”:“chocolate”, “quantity”:10 } Dictionary with fixed keys d2 = dict(name=“donuts”, type=“chocolate”, quantity=10) assert d1 == d2