Python: Variable Names
Posted: Mon Apr 06, 2026 6:47 pm
They can start with an underscore (not common except in an advanced situation), lower case or upper case letter.
Other parts can contain underscores, letters, and numbers
They are case sensitive.
The data type doesn't need declaring but is in this example.
Other parts can contain underscores, letters, and numbers
They are case sensitive.
The data type doesn't need declaring but is in this example.
Code: Select all
band = str("Shocking Blue")
_song_of_band = str("Venus")
NationOfBand = str("Holland")
number_of_band_members_is_4 = bool(True)