Naming Rules
Swipe to show menu
There are several rules for naming variables in Python. These are the following:
- A variable name must start with a letter or the underscore character, which means a variable name can not begin with a number.
- A variable name may contain only English letters, numbers, and underscore characters.
- Variables’ names are case sensitive, i.e.,
Chapter,chapter, andCHAPTERwill be considered three different objects by Python.
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 2
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Naming Rules
There are several rules for naming variables in Python. These are the following:
- A variable name must start with a letter or the underscore character, which means a variable name can not begin with a number.
- A variable name may contain only English letters, numbers, and underscore characters.
- Variables’ names are case sensitive, i.e.,
Chapter,chapter, andCHAPTERwill be considered three different objects by Python.
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 2