Newbie question. Are those different objects ?

dec135 at msn.com dec135 at msn.com
Fri Dec 20 16:16:31 CET 2013


y = raw_input('Enter a number:')
print type y
y = float(raw_input('Enter a number:'))
print type y

I'm assuming that y is an object. I'm also assuming that the second and the first y are different objects because they have different types.
The second time we type print type y, how does the program knows which one of the y's it refers to ?  Is the first y object deleted ?
thanks in advance.



More information about the Python-list mailing list