Python- variable naming convention (11)

Python variable naming convention

1. Basic Concepts

Identifier : programmer-defined variable names, function names. Life name to see to know the name of justice , alphanumeric underscores, numbers can not begin.
Keywords : internal python has been used identifier, user-defined keywords and identifiers can not be the same. The following command can be used to check the Python keywords

import keyword
print(keyword.kwlist)

Here Insert Picture Description

2. Considerations

1.Python case sensitive identifier
2. Variable life by a plurality of words when the composition, the use of each word in lowercase letters , with between words underlined connection.
3. Other languages have other naming methods
(small hump: the first word begins with a lowercase letter, followed by a word beginning with a capital letter)
(large hump: are all words start with a capital letter)

Guess you like

Origin blog.csdn.net/sinat_40624829/article/details/89555165