The term “identifier” refers to the name of a variable. When naming variables in Python, there are a few guidelines to follow.
1. The variable’s name must always begin with a letter or an underscore ( ). For example, the variables _str, str, num, and _num are all allowed names.
2. The variable’s name must not begin with a number. 9num, for instance, is not an acceptable variable name.
3. Variable names cannot contain special characters like percent, $, or #; they must only contain alphanumeric characters and underscore (A to Z, a to z, 0-9, or ).
4. In Python, variable names are case sensitive, therefore num and NUM are two separate variables.
Python Variable Example
num = 100
str = “VistaAcademy”
print(num)
print(str)
practice in below