这样定义字典错在哪了,没看懂
c = dict(99="吕布", 90="关羽", 60="刘备")https://fishc.com.cn/thread-217658-1-1.html
不能这样定义字典,可以看看这篇帖子,同样的问题:
https://fishc.com.cn/forum.php?mod=redirect&goto=findpost&ptid=217658&pid=5966397
临时号 发表于 2022-10-4 13:08
https://fishc.com.cn/thread-217658-1-1.html
哈哈 巧了
c = {99: "吕布", 90: "关羽", 60: "刘备"} 本帖最后由 jackz007 于 2022-10-4 13:25 编辑
c = dict({99:"吕布", 90:"关羽", 60:"刘备"}) # dict() 的参数必须是一个字典对象,key 与 value 之间是 ':' 不是 '=' 字典不是这样写吗
dir={name:'张三',user:'aa',password:'123'}
页:
[1]