Skip to Content
Python语言及其应用(第2版)
book

Python语言及其应用(第2版)

by Bill Lubanovic
March 2022
Intermediate to advanced content levelIntermediate to advanced
522 pages
13h 52m
Chinese
Posts & Telecom Press
Content preview from Python语言及其应用(第2版)
483
附录E
速查表
我发现自己经常要查找东西。下面列出的表格希望能对你有所帮助。
E.1
运算符优先级
E-1
Python 3
运算符优先级官方文档的汇编,最高优先级的运算符位于顶部。
E-1Python 3运算符及其描述和示例
运算符 描述和示例
[
v
, ...]
{
v1
, ...}
{
k1
:
v1
, ...}
(...)
列表
/
集合
/
字典
/
生成器的创建和推导式,括号表达式
seq
[
n
]
seq
[
n
:
m
]
func
(
args
...)
obj
.
attr
索引、切片、函数调用、特性引用
**
幂运算
+
n
n
~
n
正号、负号、按位求反
*
/
//
%
乘法、浮点除法、整数除法、取余
+
-
加法、减法
<<
>>
按位左移、按位右移
&
按位与
|
按位或
in
not in
is
is not
<
<=
>
>=
!=
==
成员关系和等量测试
not x
逻辑非
and
逻辑与
or
逻辑或
if ... else
条件表达式
lambda ...
lambda
表达式
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python编程入门与实战

Python编程入门与实战

Posts & Telecom Press, Fabrizio Romano
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham
Python技术基础视频教程

Python技术基础视频教程

保罗·J·戴特尔
Python面向对象编程指南

Python面向对象编程指南

Posts & Telecom Press, Steven F. Lott

Publisher Resources

ISBN: 9787115586223