Python equivalent for C++ STL vector/list containers

前端 未结 4 657
小鲜肉
小鲜肉 2020-12-29 06:29

Is there something similar in Python that I would use for a container that\'s like a vector and a list?

Any links would be helpful too.

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 06:45

    Python also has as part of the standard library an array type which is more efficient and the member type is constrained.

    You may also look at numpy (not part of the standard library) if you need to get serious about efficient manipulation of large vectors/arrays.

提交回复
热议问题