python3.6で以下のソースを実行したところ、TypeErrorが出ましたので解決法を教えていただきたいです。
python3
1sgs = {"switcherA": {}, "switcherB": {}} 2msg = 'qwerty12' 3sgs["switcherA"] = msg 4del sgs["switcherA"][msg]
Error
1Traceback (most recent call last): 2 File "<stdin>", line 1, in <module> 3TypeError: 'str' object does not support item deletion

回答4件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。