How can i return more than one value from a function to more than one variable

2013-12-23 Thread dec135
basically what I wanna do is this : x = 4 y = 7 def switch (z,w): ***this will switch z to w and vice verca*** c= z z=w w=c print 'Now x =', w, 'and y = ' , z return w x = switch(x,y) How am I supposed to do so I can return also a value to the variable y WITHOUT printi

Newbie question. Are those different objects ?

2013-12-20 Thread dec135
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 progra