[Tutor] Function calls

kumar s ps_python at yahoo.com
Sun Nov 14 19:05:45 CET 2004


Dear group,
 i have been practising some function examples:

here is a function i wrote:


def min3(*args):
	tmp = list(args)
	tmp.sort()
	return tmp[0]

>>> min3(1,3,4,5,6,[1,3,4,0])
1
>>> min3(1,2,3,4,5,(1,0))
1


Why isnt it showing '0' as the minimun value. this
function should report min value irrespective of a
list or a tuple passed to an argument as a call.

Can any one help me understand please.

thank you. 

regards, 
kumar


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



More information about the Tutor mailing list