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 trialleonard jurado
12,445 Pointsif "tacos" not in taco_joint: taco_joints.remove(taco_joint)
Good day! This actually refers to the previous step (question and answer portion) of this video. I tried the 2nd question in the launcher expecting that all items/elements which has a "taco" (whatever case - upper or lower or combination of both) would not be removed. Apparently, if the word "Taco" is present, as oppose to "taco", it would still be removed. How can I modify the script so that the word "taco" - whatever case it would be (upper, lower or combination of both) would not be removed?
Thanks
2 Answers
Erik Quiroga
3,474 PointsHola Leo,
In the example code above you are missing the lower() method after taco_joint. I too tried the previous code out of curiosity and found myself doing that little mistake.
if 'taco' not in taco.joint.lower():
taco_joints.remove(taco_joint)
Hope that helps. If not let me know. Saludos, Erik
leonard jurado
12,445 PointsHi Erik,
That's it!!! Thank you very much.