Python代码实现如下要求:已知列表[{'sram_config': '64x16', 'mux': 4, 'drawing dimension area (um^2)': 1400.132}, {'sram_config': '64x96', 'mux': 4, 'drawing dimension area (um^2)': 5951.972}, {'sram_config': '128x16', 'mux': 4, 'drawing dimension area (um^2)': 1646.761}],求字典中所有drawing dimension area的值的和。
时间: 2023-04-01 15:03:20 浏览: 146
可以回答这个问题,Python代码如下:
```python
lst = [{'sram_config': '64x16', 'mux': 4, 'drawing dimension area (um^2)': 140.132}, {'sram_config': '64x96', 'mux': 4, 'drawing dimension area (um^2)': 5951.972}, {'sram_config': '128x16', 'mux': 4, 'drawing dimension area (um^2)': 1646.761}]
total = sum(d['drawing dimension area (um^2)'] for d in lst)
print(total)
```
输出结果为:900.865
阅读全文