Why is plus-equals valid for list and dictionary?

前端 未结 0 1962
既然无缘
既然无缘 2020-12-10 07:09

Adding a dictionary to a list using the __iadd__ notation seems to add the keys of the dictionary as elements in the list. Why? For example

a = [         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题