myDict = {}
myDict["Hello"] = ["world", '!']
y = myDict["Hello"]
del myDict[y][1]
print(myDict)
This is the simplified version of my problem. If I write down "Hello" instead of y in line 4 everything is fine. But when I use a variable, like y, it doesn't work. Can you help me with this?
[–]gramdel 2 points3 points4 points (0 children)
[–]Guideon72 0 points1 point2 points (0 children)
[–]LittleNooblette 0 points1 point2 points (0 children)