Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (Retired) Shopping List Lists

Lists 2 quiz... length

So I finished all of the course, but I skipped this quiz cause I didn't know the right answer.

Find the length of the list below.

__________ ([1, 2, 3])

3

What I put in the blank is: len([1, 2, 3]) I put this in an IDE and got 3 an the output. Why is this not working in the quiz?

2 Answers

Gunhoo Yoon
Gunhoo Yoon
5,027 Points

Did you put only 'len'? that's the correct answer. If you put len([1, 2, 3]), it is not correct because the quiz fills ([1, 2, 3]) part for you.

oh... jeez. haha that's a little confusing then. I thought they were just showing the list they wanted there.

I put len([....]) Thanks for clarifying!

"len" is definitely the correct answer, the questions can be tricky - make sure to read the whole question, and only fill in the parts they ask for.