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 (2015) Python for Beginners Errors

Difference between print("Hello world!") and print('Hello World!')?

I just started learning python and in the 6th video of the basics the instructor used '' and "" for the print function and I'm wondering what the difference is and how would it affect one's code down the line?

the only difference I see is the capitalization in world.

2 Answers

Craig Campbell
Craig Campbell
14,428 Points

The only difference to the computer is that you capitalized the W in "World". Python doesn't care if it's double quotes or single quotes (as long as you don't mix and match single with double!)

valerakushnir
valerakushnir
2,265 Points

No difference, as long as your use of quotation marks is consistent.