Python is case sensitive. Whether it is a variable, function, or class, it must be strictly case sensitive.
For example, page and Page are two different variables, and name and Name are also two completely different variables.
If you accidentally confuse the name of the variable, the program will report an error
For example, define a variable name ='Lucy', output this variable, but it is not case sensitive
name ='Lucy'print(Name)
NameError: name 'Name' is not defined
Therefore, in daily study or actual work, you must pay attention to case sensitivity and develop good coding habits.
Example supplement:
If it can distinguish between identifiers like myname and Myname, then it is case sensitive. In other words, it cares about uppercase and lowercase.
myname='Ayushi'print(Myname)Traceback(most recent call last):
File "E:/py3.6code/xx", line 6,in<module
print(Myname)
NameError: name 'Myname' is not defined
So far, this article on whether python code is case sensitive is introduced. For more relevant python case sensitive content, please search for ZaLou.Cn's previous articles or continue to browse related articles below. I hope you will support ZaLou more in the future. Cn!
Recommended Posts