[Solved] How does using an if statement after an elif statement work? [closed]


If there is an if statement after an elif, this means this a different block of if statements. For example, if I do

yes = "yes"
no = "no"

if yes == "yes":
    print("yee")
elif no == "no":
    print(":(")

It will only print “yee” as after it stopped after the first one worked. However, if we do this:

if yes == "yes":
    print("yee")
if no == "no":
    print(":(")

Both will print as they are two different statements with no correspondence to each other.

solved How does using an if statement after an elif statement work? [closed]