1. Comment on several annotation methods in Python:
(1) #号注释 single-line comment
# This is a comment
def func ():
Pass
(2) Multi-line Comment
""" """ ‘‘‘ ‘‘‘
Multi-line comments are also divided into single quotes, multiline comments, and double quotation marks.
2. Variables
Variables: variables are used to better manage memory and to make full use of memory space
Variable type: numeric type (Numbers), Boolean type (bool), string, list, tuple (tuple), dictionary (dict)
Number types: int, float, long (longer, less common), complex (plural)
Boolean type: True, False
The definition of a variable is already defined in the underlying language, and it is not necessary to define the declaration again, which can be used directly for assignment. You can use the type to view
3. Identifiers
The identifier is the programmer's name for some code in the program, which is often used more than once, so in Python there are some naming conventions for these names.
Big Hump naming method: Every word of the first letter are capitalized operations, because many names are composed of multiple words, such as username, MyName ...
Small hump nomenclature: The first letter of the first word is lowercase, the first letter of the following word is capitalized username, Usernameworld ...
Underline connection naming method: such as Send_name, User_center_info ...
4. Keywords
Keyword: An identifier that has been assigned a special meaning in Python, and has been given a meaning identifier.
Example: print, input, pass, def ...
Python Basics (i)