What exactly is a python variable?

Veek M vek.m1234 at gmail.com
Thu Nov 17 00:40:03 EST 2016


In C:
int x = 10; 
results in storage being allocated and type and location are fixed for 
the life of the program. 

In Python,
x = 10

causes an object '10' to be created but how exactly is 'x' handled? 
Symbol Table lookup at compile time? Is every 'x' being substituted out 
of existence? Because type(x) gives 'int' so..



More information about the Python-list mailing list