Python Forum

Full Version: Maximum Elements in List
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a doubt - How to find the maximum no. of elements that can be placed in one list.
Also, how can I extend this size limitation.

Thanks
on a 32 bit system, maximum size is 536,870,912 items.
on a  64 bit system it's Hugh 9,223,372,036,854,775,807

you can find out by looking at the 'C' source,
PY_SSIZE_T_MAX
in pyport.h

do you need something larger?
if so, I recommend you get a huge loan and buy a Cray!