I got helped :)


#1



Oops, try again. Your code looks a bit off. Check the console window for errors!

  File "python", line 4
    lst.append(9)
      ^
IndentationError: expected an indented block


lst = [3, 5, 7]

def list_extender(lst):
lst.append(9)
return lst

list_extender(lst)


#2

What's wrong? I'm Stuck :frowning:


#3

Hullo? Anyone?? I need heeeelllllppppppp :rage:


#4

It's just as the error says:

IndentationError: expected an indented block

means that that line should be indented. Like this:

lst = [3, 5, 7]

def list_extender(lst):
    lst.append(9)
    return lst

Indentation is important in Python.


#5

Thank you, thank you :slight_smile:


#6

:slight_smile: Yay but now i'm stuck on 13. Modifying each element in a list in a function can you help?


#7

I'm editing everything now :slight_smile:


#8

Never mind I will make a new thingamajig


#9

Yes, please make a new thread. Don't want to confuse others.


#10

I made a new thread :slight_smile:


#11

And then I hold up a new thread and needle :slight_smile:


#12

Yes, I take everything literally :slight_smile:


#13

My new thread

https://discuss.codecademy.com/t/13-modifying-each-element-in-a-list-in-a-function/73440

#14

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