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 trialTaylor Thurman
iOS Development Techdegree Student 2,625 PointsWhy does a SyntaxError: invalid syntax show up under while True, only after adding the add_to_list(new_item) function
The program runs normal if the functions is not there, but as soon as it's put in place, a syntax error pops up with a caret under E of while.
1 Answer
Steven Parker
231,269 PointsYou didn't share your code or workspace, so this is just a guess, but I helped someone earlier today with a similar error.
In that post , there were mismatched parentheses on the line above, which got detected as a syntax error on the while.
Maybe there's something similar going on in your case. Check the previous line for a possible typo or other error.