if statement has another if inside it, and the first test compares two strings.
word = "Loop"
if word < "loop":
if len(word) > 3:
print("A")
else:
print("B")
elif word == "loop":
print("C")
else:
print("D")
What does the program print?Log in to join the discussion.
Loading…