human
Sort 3 Integers without using if condition or using only max ( ) function | Python3 program to print three numbers in sorted order using max function.
Find maximum element.
Find minimum element.
Driver Code"
Solution in Python:
 What is a code to sort 3 Integers without using if condition or using only max ( ) function and the other steps required?
assistant
#Here is code to sort 3 Integers without using if condition or using only max ( ) function and the other steps required.
 def printSorted ( a , b , c ) :
	get_max = max ( a , max ( b , c ) )
	get_min = - max ( - a , max ( - b , - c ) )
	get_mid = ( a + b + c ) - ( get_max + get_min )
	print ( get_min , " ▁ " , get_mid , " ▁ " , get_max )
a , b , c = 4 , 1 , 9
printSorted ( a , b , c )