Basic Python Syntax

Comments

A comment starts with a hash character (#) that is not part of a string literal, and ends at the end of the physical line.

# This is a comment

Print

The print function prints objects to standard output or to a text stream.

# This script demonstrates a Python print statement.
print
("Hello gitbook!")

Exit

The exit function exits from Python.

exit()

results matching ""

    No results matching ""