1. The output string formatting
% placeholder:
declared type of placeholder% s - string% d /% i - escaped become common integer %%%
% () no more, no less, a a correspondence
f "{}" braces are generally put in the content string variable in single quotes
version 3.6 and above to use
2.while cycle
while key conditions: (infinite loop)
loop
condition terminates the loop
break terminates the current cycle
continue out of this cycle, the next cycle to continue to masquerade as the last line of the loop body
- Operators
arithmetic operators-
-
- /% ** //
assignment operator
+ = = - = = * / ** =% = = = //
logical operators
and (with - and) or (or) Not (non - not)
comparison operators
! == => <> = <=
member operator
in is not in not in
4 encoding
ASCII code - does not support Chinese
GBK - GB:
English one-byte
Chinese two-byte
Unicode - Unicode:
English 2 bytes
Chinese 4 bytes
utf-8 - the most popular encoding
English one byte
European two-byte
Asian 3 bytes
unit conversion:
. IB = 8B
1024B = 1KB
1024KB 1MB =
1024MB = 1GB
1024GB 1TB =
`` `
- /% ** //
-
-