pyhon,设置字典格式为:名字,银行卡1,银行卡2,银行卡3,微信号,虚拟币地址,金额。往字典添加数据
时间: 2024-06-12 09:08:19 浏览: 53
一种基于梯度方向直方图的俯视行人的检测方法
可以使用以下代码来设置字典格式和往字典添加数据:
```
# 设置字典格式
customer_info = {
'name': '',
'bank_card_1': '',
'bank_card_2': '',
'bank_card_3': '',
'wechat_id': '',
'crypto_address': '',
'amount': 0
}
# 往字典添加数据
customer_info['name'] = '张三'
customer_info['bank_card_1'] = '1234567890123456'
customer_info['bank_card_2'] = '6543210987654321'
customer_info['bank_card_3'] = '9876543210123456'
customer_info['wechat_id'] = 'zhangsan123'
customer_info['crypto_address'] = '0x1234567890abcdef'
customer_info['amount'] = 10000
print(customer_info)
```
输出结果为:
```
{'name': '张三', 'bank_card_1': '1234567890123456', 'bank_card_2': '6543210987654321', 'bank_card_3': '9876543210123456', 'wechat_id': 'zhangsan123', 'crypto_address': '0x1234567890abcdef', 'amount': 10000}
```
阅读全文