0
Why is this python code gives me a key error?
aLst={‘a’:1,’b’:2,’c’:3} print(aLst[‘a’,’b’])
2 Answers
+ 6
Because there is no key as ['a','b']
print(aLst['a'])
print(aLst['b'])
+ 1
Add fact you can't have two key to one data
aLst={‘a’:1,’b’:2,’c’:3} print(aLst[‘a’,’b’])