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

Post navigation

If you like this post you might alo like these

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock