-
The variable name can only contain letters (case), numbers, and underscores (_), and cannot contain spaces or other special characters. -
The variable name must start with a letter or underscore, not a number. -
Variable names are case sensitive, for example number and Number Is a different variable name. -
Avoid using Python keywords (reserved words) as variable names, such as if 、 for 、 while Etc. -
Try to choose descriptive variable names to better understand the meaning of the code. -
Use a combination of lowercase letters and underscores to name variables, such as my_variable , which is a common practice in the Python community.
age = twenty-five name = "Alice" is_active = True total_score = ninety-five point five