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 Collections (2016, retired 2019) Lists Creating lists

number does not seem correct.

Can't seem to get this done. Asking for three numbers and two lists. No matter what I don I get an error saying wrong number of strings.

lists.py
my_list = ['2','my first string', '3', 'my second string', '4', 'string']

2 Answers

Few things:

  • In general, anything inside of a pair of quote ( "this" ) or apostrophe ( 'that' ) characters will be turned into a string.
  • Correcting bullet #1, your list will still have too many strings it.
  • You're not following this part at all: "For the last member, though, add another list with 2 items in it."

Let me know if this helps here

Try this:

my_list = [11, 8, 9, 'a', 'b', [1, 2]]