For example:
mydict = {'Jan':[1,2,3]}
How can I add another value to that key? I tried the update method but that just overwrites the entire key.
Any help is appreciated thanks!
尝试这个:
mydict['Jan'].append('value')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.