FAQ: Code Challenge: Lists - Append Size


This community-built FAQ covers the “Append Size” exercise from the lesson “Code Challenge: Lists”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Computer Science
Data Science

FAQs on the exercise Append Size

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


I tried this :

def append_size(lst):
size = len(lst)
return lst.append(size)

it returns NONE



Because the list.append() method does not have a return value. We need to return the list after appending to it.

return lst


Thank you Roy for your answers. Just after my post I found the solution. So I could finish this path and it’s because of your help. It was challenging at the beginning but oh so rewarding at the end :slight_smile:
How long have you been programming and with which language did you start?


Before joining CC I developed old-school webs for some local non-profits, learning as I went. HTML/CSS were my first languages, then a few years in I started to learn JS, followed up by PHP. I didn’t really get into learning in depth until I joined here. I learned Python and Ruby here, but have kept my focus on beginner and intermediate level problem solving, hence you see me here on the front line with the newbies.


Great experience ! Thank you for being with us, Roy :slight_smile: (the newbies)