Deleting a few list items inside of dictionary

前端 未结 5 1995
余生分开走
余生分开走 2021-01-27 13:55

Deleting a few list items inside of dictionary

Hi, I have a dictionary:

phone = {\"first\":100,\"second\":200,\"third\":[10,12,5,38],\"fourth\":400}
         


        
5条回答
  •  既然无缘
    2021-01-27 14:33

    Access values of the phone dictionary, Remove items of the List .

    other answer - try get the item (key, value) containing data you want to change. remove it from dictionary. modify values (list) of this item. and then add it to dictionary

提交回复
热议问题