Lists + Functions


#1

Not sure what my error is?

04%20PM

In my console:


#2

Check your indentation. Code inside the block should be indented.


#3

I have tried different indentations for this line and none seem to make it work. :frowning:


#4
def function(x):
    count = 0
    for item ...
        if item ...
            count += 1
    return ...

#5

Thanks! Your indentations make sense!!!


#6

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