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
Lance Dickey
745 Pointswhy this works in workspace and not on code challenge cheers
messy_list = ["a", 2, 3, 1, False, [1, 2, 3]]
Your code goes below here
messy_list.pop(0) messy_list.pop(2) messy_list.insert(0,1)
2 Answers
Steven Parker
243,199 Points Be careful about testing a challenge in an external REPL or Workspace.
If you have misunderstood the challenge, it's also very likely that you will misinterpret the results.
In this case, task 1 of the challenge asks you to start by "moving the 1 from index 3 to index 0". So after performing the task as instructed, the "messy_list" will contain "[1, 'a', 2, 3, False, [1, 2, 3]]".
But after running your code, "messy_list" contains "[1, 2, 3, False, [1, 2, 3]]". It's close, but it's not quite the same.
Lance Dickey
745 Pointsthanks Steven
Kunal Gupta
2,392 PointsKunal Gupta
2,392 PointsAs information provided by you is not enough, I'm assuming that you're performing some kind of challenge. Different websites have different protocols to validate the answer. If you're performing a challenge in which they are asking for a specific answer and you're not providing it, they might give an error. As the challenge is coded to receive a specific answer.