Jan-06-2021, 07:34 PM
finds the maximum both in the text and in numbers from two related functions, it is really beautiful.
in1=str(input("1. insert text: ")) in2=str(input("2. insert text: ")) in3=str(input("3. insert text: ")) def max1(a,b): if a>b: return a else: return b def max2(a,b,c): return max1(a,max1(b,c)) c = max1(in1,in2) d = max2(in1,in2,in3) print(f"max between 1 and 2= {c}") print(f"max between 2 and 3= {d}")