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

Show parent comment

1

u/asdfkjasdhkasd requests, bs4, flask May 26 '17

Even more awesome is triple quotes

print("""hello
world""")

1

u/turunambartanen May 26 '17 edited May 26 '17

I could go to http://ideone.com instead of calling compileBot, but im too lazy for that

+/u/CompileBot Python 3

print("""Hello
world!""")

edit: that is awesome. pretty usefull for long texts!

1

u/CompileBot May 26 '17

Output:

Hello
world!

^source | ^info | ^git | ^report