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

Python Python Basics Meet Python Syntax and Errors

Hi. I used a single quotation print('Hello, World') and received this error SyntaxError: unexpected EOF while parsing

I thought we could use single quotation marks for "Style" but was I wrong?

Steven Parker
Steven Parker
231,275 Points

The quote marks were probably not the cause of the error, but we'd need to see the actual code to determine the cause.

Take a look at this video about Posting a Question, and perhaps also this one about sharing a snapshot of your workspace.

2 Answers

You can use single or double quotes.

SyntaxError: unexpected EOF while parsing indicates that you might have removed the closing ) of the print statement when switching the quotation marks.

you need to save it before you type python hello.py in the console