Thursday, March 12, 2020

if in python

first=input("First string:")
second=input("second string")
if first>second:
    tup=(first,second)
else:
        tup=(first,second)
print("%s is greater than %s"%tup)

output:
First string:anil

second stringabhi
anil is greater than abhi

No comments:

Post a Comment

python class topic video