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

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

by Bill Lubanovic
March 2022
Intermediate to advanced
522 pages
13h 52m
Chinese
Posts & Telecom Press
Content preview from Python语言及其应用(第2版)
3
1
Python
初探
只有丑陋的语言才会流行。
Python
是一个例外。
——高德纳
1.1
谜题
让我们从两个小谜题及其解决方案开始。你认为下面两行代码的含义是什么?
(Row 1): (RS) K18,ssk,k1,turn work.
(Row 2): (WS) Sl 1 pwise,p5,p2tog,p1,turn.
看上去挺有技术范儿,似乎像是某种计算机程序。实际上,这是一幅
针织图案
。更准确地
说,以上代码片段描述的是如何编织袜子的足跟部分,如图
1-1
所示。
1-1:针织袜子
4
1
就我而言,看懂它们的难度不亚于让猫咪搞明白数独拼图,但对我妻子来说这是轻而易举
的事。你要是也懂编织,看懂它自然不在话下。
来试试另一段从索引卡上找到的神秘文字。你马上就能明白这是要干什么,尽管可能不清
楚最终会做出什么东西。
1/2
杯黄油或者人造黄油
1/
2杯奶油
2.5
杯面粉
1
茶匙盐
1
汤匙糖
4
杯糊状土豆(冷却的)
确保在加入面粉之前所有材料都是冷却的。
混合所有材料。
揉搓均匀。
揉成
20
个球并冷藏。
对于每一个球:
在布上洒上面粉;
用擀面杖将球擀成圆饼;
入锅,炸至棕色;
翻面,继续炸。
就算不会做饭,你应该也能看出这是一份
食谱
1
:一系列食材以及准备工作。这到底是在制
作什么食物呢 ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

可编程网络自动化

可编程网络自动化

Jason Edelman, Scott S. Lowe, Matt Oswalt
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham
量子计算机编程:从入门到实践

量子计算机编程:从入门到实践

Eric R. Johnston, Nicholas Harrigan, Mercedes Gimeno-Segovia
Python编程入门与实战

Python编程入门与实战

Posts & Telecom Press, Fabrizio Romano

Publisher Resources

ISBN: 9787115586223