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!

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 and Strings

I am completely stuck on task 2. When I complete it as it makes sense to me I get "task number one is no longer passing

Is the problem with task one? I thought just by virtue of making the string a list it splits on whitespace. If I apply the split function to my list variable I also get an error. I just can't figure out where my problem is here.

Thanks, Jan. I'm just getting started here and I really did think I was smart enough to learn this, but I have been stuck on this task for two days. I cannot get task one AND task two to work. Task one passes and task two does not or vice versa. Maybe someone else will try and either verify there is an error or explain what is happening.

2 Answers

Hi Julianne,

The error you're experiencing is caused by the extra code you added for task two causing an error of its own. The reason why that would make Task 1 fail is that the website is checking for the result of Task 1, and it gets an error response; it's not so much that Task 1 is now wrong, as much as that the code for Task 2 is wrong and is causing an error.

You can fire up Workspaces and run your code to see what the error is specifically; however, task 2 is looking for:

greeting_list = "Hi, I'm Treehouse".split()

Thank you, Evan. I swear I had tried that exact line during my many previous attempts, but it worked!

Hey Julianne, that happend to me sometimes aswell, not sure what is causing it, try removing the code from task 2 and then check the answer again. Atleast that did the job for me most of the time.

I also just tried that question, there seems to be an error somewhere. From what I believe this should be the correct answer for part 1, however it is not accepted.

full_name = "Jan MΓΌller"
name_list = full_name.split( )

Hi Jan, your code isn't passing because the test doesn't accept the character "ΓΌ". I've reported the issue, but you can pass in the meanwhile by replacing it with a "u".

Edit: Also, you don't need to define a space in your split() method, as the method assumes you want to split on spaces by default.