Skip to content

Python Identifiers

Rules that apply when naming the variable name, function, classes object

Rules / Properties of variable name

  1. Not allow to use keywordsList of Keywords

  1. Case-sensitives

Case sensitive means it treats uppercase and lowercase letters as completely different characters.

case-sensitives.py

py
andy = "andy1"
Andy = "andy2"
print(andy)
print(Andy)

Results:

andy1
andy2

  1. Content Restriction

This means that variable name only allow named with:

  • English
  • Number after String
  • with Underscore (_)