Dec-10-2020, 04:26 PM
Please wrap code in Python tags (see the Python button in the editor).
Most likely you have an indentation error. This code runs:
Most likely you have an indentation error. This code runs:
string1=input("Enter a word: ") string2=input("Please enter another word: ") if len(string1) > len(string2): print("True") else: print("false") print("True" if len(string1) > len(string2) else "false")You can also use a ternary expression like that in the bottom line.