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
, andCHAPTER
will be considered three different objects by Python.
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 2
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 4
Naming Rules
Sveip for å vise menyen
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
, andCHAPTER
will be considered three different objects by Python.
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 2