Python3 why am I gettng a KeyError when adding a key to a dictonary

前端 未结 0 1107
迷失自我
迷失自我 2021-02-05 08:09

I am still trying to learn the ins and outs of Python dictionaries. When I run this:

#!/usr/bin/env python3
d = {}
d[\'foo\'][\'bar\'] = 1

I get

相关标签:
回答
  • 消灭零回复
提交回复
热议问题