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 trialJelena Simic
285 Pointsprint("first_name, "is learning python")
Getting SyntaxError: invalid syntax at min 9:15 when I try to print("first_name, "is learning python"). The "is" is showing up red. I'm trying to copy exactly what he's doing and I cant figure out why it's red.
1 Answer
volhaka
9,875 PointsIt is not clear what are you trying to print but you have 3 quotation marks in your string that you want to print. It causes SyntaxError. it should be 2 single or 2 double quotes around string value. so your print expression could be like that :
print("first_name", "is learning python")
or like that :
print("first_name is learning python")
or if first_name is a variable :
print(first_name, "is learning python")
But I think it should be your name instead of "first_name", but it is not related to SynaxError ;-)
Jelena Simic
285 PointsThank you!
Justin White
8,765 PointsJustin White
8,765 Pointslooks like the first " is not needed. Try doing print(first_name, "is learning python") i am assuming first_name is a variable. In python when you are calling a variable you do not need to add quotation marks around it.