python3.6 learning basic grammar notes 2

2.1 identifier and reserved word

Identifier is used to identify variable, function, class name, and the object module. Python identifier may contain letters (AZ, az), numbers (0-9), and the underscore character (_), but it has limitations the following aspects:

⑴ identifier of the first alphabet character must be a letter or underscore '_', and the name can not have spaces between variables.

⑵ Python identifier is case-sensitive, so the data Data identifiers are different.

⑶ In Python 3, non-ASCII identifier is permitted to use

⑷ reserved words can not as identifiers.

import keyword

print(keyword.kwlist)

Guess you like

Origin www.cnblogs.com/oneby/p/11701217.html