In Python, why is it that list take more time to create, than a plain variable?
Let's say you create 2 variables:
x = 1
y= [1]
Lets say you these variables millions of times and compare their time to run.
Since all variables in Python are created on the heap, why is that variable y, which is the list, take more time to create than x?
xonly needs to create a1whileycreates alistand a1...