Python Variable Naming Convention

Here are few things that we have to remember when naming variables and objects in Python.

  • Python is a case sensitive language. ‘x’ and ‘X’ will be treated as different variables.
  • Python variables can have letter, numbers and underscores only
  • The variable names to begin with a letter or underscore only
  • Single line comments are denoted with ” # ‘ and multiple line comments are with triple quotes ”’ ”’

Few examples-