You want to check the other numbers also
n1=int(input("N1: ")) n2=int(input("N2: ")) n3=int(input("N3: ")) for num in [n1, n2, n2]: ## a number will never be greater than itself ## so there is no harm in comparing it to itself if num >= n1 and num >= n2 and num >= n3: print(num)