I don't understand my indentation error



I don’t understand why the elif has an indentation error, it looks and is setup just like the if and else statements.

My Code~~
def the_flying_circus():
    if 2>= 5 and 50 == 10*5:    # Start coding here!
        # Don't forget to indent
        # the code inside this block!
    elif 5 == 5:
        # Keep going here.
        # You'll want to add the else statement, too!
    else print "I did it!"  


yes, but an if clause can’t be empty:

if condition:
   # code that needs to execute if condition is true should go here
   # this can't be empty!!!

see the comments i wrote, it can’t be empty.There needs to be code, if you want to do nothing you can use the pass keyword


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.