On 12/20/2013 10:16 AM, dec...@msn.com wrote:
y = raw_input('Enter a number:')
print type y
y = float(raw_input('Enter a number:'))
print type y

I recommend starting with 3.3 unless your are forced to use 2.x.
I also recommend trying code before posting it.

I'm assuming that y is an object.

The name 'y' is bound to an object. The second assignment rebinds 'y' to a different object.

I'm also assuming that the second and the first y are different objects

It depends on whether by 'y' you mean the name, which remains the same, or the object it is bound to, which changes.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to