Python Write Better Python Cleaner Code Function and Class Whitespace

What's wrong with my indentation?

This is suppose to be an easy quiz to fix indentation, what am i doing wrong?

starter.py
def first_function(arg1):
    return 'arg1 is {}'.format(arg1)


def second_function(arg1):
    return 'arg1 is {}'.format(arg1)


class MyClass:
    args = [1, 2, 3]


def class_func(self):
    return self.args

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I think you're doing pretty well here, but the instructions mention a class method. Remember, a method is a fancy name for function defined inside a class which means it should be indented under class. Also, your file will need a blank line at the end. It's hard to say if you've put one and it's just truncated here or not, but it will be required. Keep this in mind too as you make these corrections, that when you hit enter or return to go to the next line, because of the auto-indent feature happening you can end up with some extra whitepsace on what appears to you to be a blank line. The line must be completely blank without any tabs or spaces. So if you get a Bummer! saying there's whitespace on a blank line, that's what it means. I feel like you can get it with these hints, but let me know if you're still stuck! :sparkles: