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-



One thought on “Python Variable Naming Convention

  1. Pingback: Learn Python Step by Step | RP's Blog on data science

This site uses Akismet to reduce spam. Learn how your comment data is processed.