That’s what they expect:
def sorttuple(a):
... do something, like sorting..
return b
a=(3,2,1)
b=sorttuple(a)
print b
output:
(1,2,3)
solved Python Function: Tuple as argument and return sorted [closed]
That’s what they expect:
def sorttuple(a):
... do something, like sorting..
return b
a=(3,2,1)
b=sorttuple(a)
print b
output:
(1,2,3)
solved Python Function: Tuple as argument and return sorted [closed]