Python: Variable Names

Post Reply
User avatar
Jason
Site Admin
Posts: 973
Joined: Sun Dec 21, 2025 8:56 pm
Contact:

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.

Code: Select all

band = str("Shocking Blue")

_song_of_band = str("Venus")

NationOfBand = str("Holland")

number_of_band_members_is_4 = bool(True)

 

POSTREACT(ions) SUMMARY

Post Reply