Here are the rules that you have to follow for defining the python where.
The first one is a variable must start with a letter or the underscored character.
So names like Python is valid.
Also name like underscored.
Python is also one next a variable name can start with a number.
So you can have a variable name that starts with the seven python but you can have a variable name which
is something like this python 0 0 or 1.
This is valid.
So the next one is a variable name can only contain alphanumeric characters and underscored.
Next is variable names.
Case into 2 Say for example.
Each in which all of the letters in lowercase and each year with the latest.
It is incompetent and age the rateable age your which is all letters in uppercase are different variables
then assigning a variable name to a value.
There are certain it is a code word in Python that we should not use as variable names because these
words already have special meaning in Python.
Say for example the dissolved word if this is used this the if keyword is used in if clause or the if
statement or it is old word for it.
True and so on these exact words cannot be used as variable names.
And if you try to assign a value to any of these reserved words or key words python will raise and edit
so let's see this.
In the Jupiter known book say for example we are going to use the resource to keyword forward as a variable
name and assign the value to.
And when you execute this line you get this error a syntax error and in order to see the list of desired
keywords you can use the help function and then parse the argument.
Key word and this will give you the list of keywords in Python.
And these should not be used as variable names in your python programs
similarly.
There are several built in functions which are included in the python standard library and we should
not use the names of these functions as variable names.
Otherwise the reference to the built in function will be lost in order to understand this.
Let's define a variable X assign the value to we use the built in function i.e. in order to know the
memory address where the variable is pointing to.
So we'll call the built in function idea and pass the variable x to this function.
And this is the memory address.
To which the variable x is pointing to.
Now I'm going to use the built in function D as a variable name in my program and say I'm going to assign
the value numeric value 5
so I.D. is now pointing to value 5.
Now if I call these same built in function and pass the variable x to this function I'm going to get
a runtime error.
So we should not use the names of these functions as variable names in other programs.
Because overwriting a built in function might have undesired side effects
similarly we should not be using built in functions like I n d for integer flawed as these are for string
list type I.D. and so on as variable names in other programs.