Lists in Python

前端 未结 7 2141
太阳男子
太阳男子 2021-01-07 05:20

Is the List in python homogeneous or heterogeneous?

7条回答
  •  悲哀的现实
    2021-01-07 05:42

    The List in Python is heterogeneous - the same list can accept objects of various different types.

    There is a snippet here which gives you a homogeneous list in Python. No idea how that piece of code would perform however.

提交回复
热议问题