在这里所作的是将所有的 Python 符号和关键字列出来,这些都是值得掌握的重点。

关键字

anddelfromnotwhile as

elifglobalor with

assertelseifpassyieldbreakexceptimportprintclassexecinraisecontinuefinallyisreturndefforlambdatry数据类型

 True

 False

 None

 strings

 numbers

 floats

 lists

字符串转义序列(Escape Sequences)

 \\

 \' \" \a

 \b

 \f

 \n

 \r

 \t

 \v

字符串格式化(String Formats)

%d -------》 数字

%i

%o

%u

%x

%X

%e

%E

%f --------》 小数

%F

%g

%G

%c

%r ----------》%r 调用 rper函数打印字符串,repr函数返回的字符串是加上了转义序列,是直接书写的字符串的形式

%s ----------》%s 调用 str函数打印字符串,str函数返回原始字符串

%%操作符号

+-***///%

<><=>===!=<> ( )

 [ ]

 { }

 @

 ,

 :

 .

= ;

+=-=*=/=//=%=**=