Write a Python function that will take 2 input values andreturns the same 2 values that is sorted from low to high. Example:If the function name is func2, func2(5,6) retuns (5,6). func2(6,5)returns (5,6).
Solution
def func2(n1,n2): if(n1<n2): return (n1,n2) else: return (n2,n1)print(func2(5,6))print(func2(6,5))
(5, 6)
(5, 6)
Output: