0% found this document useful (0 votes)
57 views2 pages

Multi-Line Statements: "Hello, Python!"

Python uses identifiers to name variables, functions, classes and other objects. Identifiers can start with a letter or underscore, followed by letters, numbers and underscores, and are case sensitive. Naming conventions include starting classes with uppercase letters and other identifiers with lowercase, while underscores indicate private or special names. The document also discusses multi-line statements using line continuation characters or contained within brackets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views2 pages

Multi-Line Statements: "Hello, Python!"

Python uses identifiers to name variables, functions, classes and other objects. Identifiers can start with a letter or underscore, followed by letters, numbers and underscores, and are case sensitive. Naming conventions include starting classes with uppercase letters and other identifiers with lowercase, while underscores indicate private or special names. The document also discusses multi-line statements using line continuation characters or contained within brackets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

print "Hello, Python!

"

A Python identifier is a name used to identify a variable, function, class,


module or other object. An identifier starts with a letter A to Z or a to z or
an underscore (_) followed by zero or more letters, underscores and digits
(0 to 9).

Python does not allow punctuation characters such as @, $, and % within


identifiers. Python is a case sensitive programming language.
Thus, Manpower and manpower are two different identifiers in Python.

Here are naming conventions for Python identifiers −

 Class names start with an uppercase letter. All other identifiers start with a
lowercase letter.

 Starting an identifier with a single leading underscore indicates that the


identifier is private.

 Starting an identifier with two leading underscores indicates a strongly private


identifier.

 If the identifier also ends with two trailing underscores, the identifier is a
language-defined special name.

Reserved Words

Multi-Line Statements
Statements in Python typically end with a new line. Python does, however,
allow the use of the line continuation character (\) to denote that the line
should continue. For example −

total = item_one + \
item_two + \
item_three

Statements contained within the [], {}, or () brackets do not need to use
the line continuation character. For example −
days = ['Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday']

You might also like