1.

Write a function that takes two char arguments and returns 0 if both the arguments are equal. The function returns 1if the first argument is smaller than the second and 1 if the second argument is smaller than the first. Please answer it very fast ​

Answer»

def function(ch1,ch2): #line1    a=ch1                    #line2    b=ch2                   #line3    if a in b:                 #line4        RETURN(0)             #line5    else:                       #line6        return(1)              #line7Explanation:its REALLY small PROGRAM we take char as string to comapre both the stringswe compared them in line 4 and if they are same we return 0else we return 1



Discussion

No Comment Found