LPTHW Exercise 9: Printing, Printing, Printing

Learn Python the Hard Way by Zed Shaw .: Escape sequences and block quotes:

countdown = "\n10\n9\n8\n7\n6\n5\n4\n3\n2\n1\n0\n\n\n"

print(countdown)
print("""
Liftoff!
Tower clear...
""")

Output:

$ python e09.1.py

10
9
8
7
6
5
4
3
2
1
0




Liftoff!
Tower clear...

$

More • pythonprogramming