Skip to content

Variables (2)

Python Variables

  1. It can only be one word
  2. It can only use letters, numbers, and the underscore character
  3. It cannot begin with a number

Python convention is to use underscores to separate words that are part of the variable name. Camel Case works but is not conventional. Upper case letters also work but are not conventional.

first_name = "John" # this is the python convention.
First_Name = "John" # not the python convention
firstName = "John"  # not the python convention