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

Paula Wills
2,893 Pointshelp(print) function not working in my terminal (mac)
When I type help(print) in my mac terminal, I get: File "<stdin>", line 1 help(print) ^ SyntaxError: invalid syntax
3 Answers

andren
28,558 PointsBy default Mac OS ships with Python 2, not Python 3 which is used and thought on Treehouse. In Python 2 print
is not technically a function like it is in Python 3, but instead a statement. It can still be used similarly to a function, but internally it is not classified as such.
That is why the help command does not work. If you want to see the help page for statements you have to enclose the name of the statement in quotes like this:
help('print')
That will produce the help page for the print
statement in Python 2.

valerakushnir
2,265 PointsSpot on, thank you!

Paula Wills
2,893 PointsPersonal. It works in worksheets, but not in my personal terminal.

Paula Wills
2,893 PointsThank you so much for explaining this!
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsAre you using workspaces's terminal or are you using your personal terminal?