Skip to content

Tag: dynamic-arrays

How do I get an empty list of any size in Python?

I basically want a Python equivalent of this Array in C: but in python I declare an array like: and the problem is I want to assign random slots with values like: but I can’t do that with Python, since the Python list is empty (of length 0). Answer If by “array” you actually mean a Python li…