String Comparison in Python

Source code :

str1= input("enter the string: ")
str2= input("enter the string:")

if str1 >= str2:
    print("true")
else:
    print("false")

Output :

enter the string: hai
enter the string: hello
false

Output :


                

Comments :