r/Python • • May 25 '17

let's write a Python program

# one line per post (replies are indented!!!)
class Reddit:
4 Upvotes

53 comments sorted by

View all comments

9

u/SirChayo May 25 '17

print ("Hello World")

3

u/nimdirect May 25 '17

print('Hello World')

Doesn't it require the single ' ? Serious question, I'm still new here.

7

u/turunambartanen May 25 '17 edited May 25 '17

nope, it works with both, which is awesome, because you can write

+/u/CompileBot Python 3

print('he said "wow this is cool"')

1

u/CompileBot May 25 '17

Output:

he said "wow this is cool"

^source | ^info | ^git | ^report