Fixed Hello World (#22172)
Fixed 'Hello world' to the original 'Hello, World' command for historical accuracy.
This commit is contained in:
@ -147,10 +147,10 @@ The built-in functions are listed in alphabetical order. The name is followed by
|
|||||||
|
|
||||||
The <a href='https://docs.python.org/3/library/functions.html#print' target='_blank' rel='nofollow'>`print`</a> function in Python 3 replaces the <a href='https://docs.python.org/2/reference/simple_stmts.html#print' target='_blank' rel='nofollow'>`print`</a> statement in Python 2.
|
The <a href='https://docs.python.org/3/library/functions.html#print' target='_blank' rel='nofollow'>`print`</a> function in Python 3 replaces the <a href='https://docs.python.org/2/reference/simple_stmts.html#print' target='_blank' rel='nofollow'>`print`</a> statement in Python 2.
|
||||||
|
|
||||||
>>> print("Hello world!")
|
>>> print("Hello, World!")
|
||||||
Hello world!
|
Hello, World!
|
||||||
|
|
||||||
A function is called when the name of the function is followed by `()`. For the Hello world! example, the print function is called with a string as an argument for the first parameter. For the rest of the parameters the defaults are used.
|
A function is called when the name of the function is followed by `()`. For the 'Hello, World!' example, the print function is called with a string as an argument for the first parameter. For the rest of the parameters the defaults are used.
|
||||||
|
|
||||||
The argument that we called the `print` function with is a `str` object or _string_, one of Python's <a href='https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str' target='_blank' rel='nofollow'>_built-in types_</a>.
|
The argument that we called the `print` function with is a `str` object or _string_, one of Python's <a href='https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str' target='_blank' rel='nofollow'>_built-in types_</a>.
|
||||||
Also the most important thing about python is that you don't have to specify the data type while declaring a variable, python's compiler
|
Also the most important thing about python is that you don't have to specify the data type while declaring a variable, python's compiler
|
||||||
|
Reference in New Issue
Block a user