+ 3
how do we delete a key and value from a dictionary?
3 Antworten
+ 2
A search says:
del mydict['key']
Setting it to None doesn't remove it or provide for garbage collection.
http://stackoverflow.com/questions/8237647/clear-variable-in-JUMP_LINK__&&__python__&&__JUMP_LINK
+ 1
use del
del dict['key']
---> will delete item which has the key 'key'
0
Downvote if you like, but I'd rather the information be accurate. This is what [پسرک تک پر] appears to be doing with the non-sequitor "hacking" post.
https://telegram.org/blog/bot-revolution