Doc:2.6/Manual/Extensions/Python/Intro to Python/Examples
< Doc:2.6 | Manual | Extensions | Python | Intro to Python(Doc:2.5/Manual/Extensions/Python/Intro to Python/Examplesから転送)
# Comment: Hello World example using string literals and print function
>>> print("Hello World")
Hello World
>>> print('"Hello World"')
"Hello World"
>>> print("'Hello World'")
'Hello World'
>>> print('"Hello \n World"')
"Hello
World"
>>> print("Hello World " * 10)
Hello World Hello World Hello World Hello World Hello World Hello
World Hello World Hello World Hello World Hello World
>>> print("Hello World\n" * 5)
Hello World
Hello World
Hello World
Hello World
Hello World
>>>print(3 * "Hello World\n")
Hello World
Hello World
Hello World