To define variables in Python, there are some rules to follow. These rules apply for all identifiers in Python including the variables, methods (function), classes, objects, modules etc.
IN PYTHON 2
and
as
assert
break
class
continue
def
del
elif
else
except
exec
finally
for
from
global
if
import
in
is
lambda
In addition to the naming rules (which we just covered), there is also naming convention in Python that we will take into consideration while covering the related topics.
But, keep the following in mind before start reading NAMING CONVENTION:
not
or
pass
print
raise
return
try
while
with
yield