How many items can contain tuple or list in python? What will be if it is 10 000?
import sys
print sys.maxsize
# prints some system-dependent number representing the maximum
# size most containers can hold.
Python sys module
I suspect on most platforms, sys.maxsize would return the same value as sys.maxint (which is guaranteed to be at least 2**31-1), but I doubt that's guaranteed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With