Why set automatically unpacks range, but list doesn`t? How this can be used?

后端 未结 0 1132
既然无缘
既然无缘 2020-12-19 16:44

I create list and set with range. Set unpacks range, list doesn`t

>>> my_list = [range(5)]
>>> my_set = set(range(5))
>>> my_list
[         


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