1. 整理python的关键字

# _*_ coding:utf-8 _*_
and
del #删除list中的某个元素或者这个list,同样适用于字典
from
not
while
as
elif
global
or
with #http://www.cnblogs.com/Brogrammer/archive/2012/07/23/2605570.html
assert #assert语句用来声明某个条件是真的。例如,如果你非常确信某个你使用的列表中至少有一个元素,而你想要检验这一点,并且在它非真的时候引发一个错误,那么assert语句是应用在这种情形下的理想语句。当assert语句失败的时候,会引发一个AssertionError。
else
if
pass
yield # http://developer.51cto.com/art/201301/379132.htm
break
except #类似于try...catch语句
import
print
class
exec #exec语句用来执行储存在字符串或文件中的Python语句。例如,我们可以在运行时生成一个包含Python代码的字符串,然后使用exec语句执行这些语句。
in
raise
continue
finally
is
return
def
for
lambda
try

2. 数据类型

View Code
True
False
None
strings
numbers
floats
lists

3. 字符串输出格式

View Code
%d
%i
%o
%u
%x
%X
%e
%E
%f
%F
%g
%G
%c
%r
%s
%%

4. 运算符

View Code
+
-
*
**
/
//
%
<
>
<=
>=
==
!=
<>
( )
[ ]
{ }
@
,
:
.
=
;
+=
-=
*=
/=
//=
%=
**=

 

相关文章:

  • 2021-06-01
  • 2021-06-02
  • 2022-01-10
  • 2021-08-26
  • 2021-04-11
  • 2021-10-29
  • 2021-08-07
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2021-09-20
  • 2021-05-20
  • 2021-12-28
  • 2021-11-23
  • 2021-07-07
  • 2021-09-19
相关资源
相似解决方案