identifier
A name for a thing in code, such as a variable, function or module name.
In more detail
Python identifiers use letters, digits and underscores, cannot start with a digit, cannot contain spaces or hyphens and cannot be a keyword. They are case sensitive. Legal is not the same as good: choose names that say what the value means.
Related terms
- keyword — A word reserved by a language for its own syntax, such as if and return in Python or SELECT and WHERE in SQL.
- variable — A name that refers to a value, created by assignment, such as width = 10.
- case sensitive — Treating capital and lower-case letters as different, so last, Last and LAST are three separate names.
- snake_case — Writing a multi-word name in lower case with underscores between words, as in tell_story, the Python standard for functions and variables.
- camelCase — Writing a multi-word name with each later word capitalised and no spaces, as in tellStory or getKeys.
Taught in
- Your Python Folder And A First Program — Hands-on Python: Complete Video Course & Book
- Variables And Assignment — Hands-on Python: Complete Video Course & Book
- Literals, Identifiers And Keywords — Hands-on Python: Complete Video Course & Book
- Defining Your First Function — Hands-on Python: Complete Video Course & Book
- Dictionaries And String Formatting — Hands-on Python: Complete Video Course & Book
- Literals, Names And Four Number Bases — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep