Are Python identifiers case-sensitive ?

Python identifiers are case-sensitive, meaning that variable names, function names, and other identifiers must be used consistently with regard to uppercase and lowercase letters.

Examples

variable = 100

Variable = 200

print(variable)

print(Variable)

Output

100
200

Features     

  • Identifiers with different cases are treated as separate and distinct.
  • The exact casing must be used throughout the code

Advantages

  • Allows for more descriptive and varied naming conventions.
  • Can help in distinguishing between variables or functions

 Uses

  • Enables use of naming conventions that differentiate between different types of identifiers (e.g., myvariable MYVARIABLE).
  • Used to Helps in organizing code
0 Shares:
You May Also Like
Read More

Robot Framework in Python

Definition Robot Framework is an open-source, keyword-driven test automation framework that uses Python for writing and executing automated…
Read More

Data Types in Python

Definition Data types in Python are classifications that specify the type of value a variable holds, determining what…