Third, variables and variable types of analytical

Third, resolve variables and variable types of variables: the program, the amount can vary, called variables. Definition of variables: variable name = variable value Example: a = 10 Note: The data types in the Python typically weakly typed language variable is not stated, but a value determined. Example: Enter the meaning of type (10) # 10 is the type integer type () is to look at the type of a variable note: When the input must change the case, the same symbols, in a different case in python, It has a different meaning. Variable (identifier) ​​naming rules: 1, the variable name must use valid characters (uppercase and lowercase letters + numbers + _) consisting of 2, 3 numbers are not allowed at the beginning, meaningful variable names 4, we recommend using the underscore method userName user_name (hump ) 5, do not use keywords, and reserved words [ 'False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def' , 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is',' lambda ',' nonlocal ',' not ',' or ',' pass', 'raise', 'return', 'try', 'while', 'with', 'yield'

Guess you like

Origin www.cnblogs.com/Mr-Liu---/p/11520644.html