Python基础教程(第2版)

Magnus Lie Hetland

出版时间

2010-06-30

ISBN

9787115230270

评分

★★★★★
AI导读
核心看点
  • 基于Python 3全面改版,结构严谨内容翔实
  • 前部分夯实基础,后部分通过十个项目实战
  • 涵盖生成器、字符串处理等核心编程概念
适合谁读
  • 零编程基础或刚接触Python的初学者
  • 希望系统梳理Python基础语法的程序员
  • 喜欢通过项目实战提升技能的进阶者
读前提醒
  • 注意书中部分翻译晦涩,建议结合代码理解
  • 后半部分项目案例较旧,重点学习开发思路
  • 遇到难点可搭配官方文档或其他教程辅助
读者共识
  • 公认的经典入门书,适合零基础建立信心
  • 翻译质量参差不齐,阅读时需耐心甄别
  • 前半部分讲解透彻,后半部分难度有所提升

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "这就在于它不是像returen那样返回值,而是每次产生多个值。每次产生一个值(使用yield),函数就会冻结:即函数停在那里等待被激活。函数被激活后就从停止的那点开始执行。"
  • "换句话说,生成器是由两部分组成:生成器的函数和生成器的迭代器。生成器的函数是用def语句定义的,包含yield部分,生成器的迭代器是这个函数返回的部分。"
  • "如果某项任务令人望而却步,将其分解为小一些的部分总是有用的。同时,要对解决问题所使用的工具进行评估。"
  • "If you are familiar with other computer languages, you may be used to terminating every line with a semicolon. There is no need to do so in Python. A line is a line, more or less. You may add a semicolon if you like, but it won’t have any effect (unless more code follows on the same line), and it is"
  • ">>> 1 // 2 0"
  • "Back to the __future__ It has been rumored that Guido van Rossum (Python’s creator) has a time machine, because quite often when people request features in the language, the features have already been implemented. Of course, we aren’t all allowed into this time machine, but Guido has been kind enoug"
  • "str simply converts a value into a string in some reasonable fashion that will probably be understood by a user, for example.11 repr creates a string that is a representation of the value as a legal Python expression."
  • "A synonym for repr(x) is `x` (here, you use backticks, not single quotes). This can be useful when you want to print out a sentence containing a number: >>> temp = 42 >>> print "The temperature is " + temp Traceback (most recent call last): File "<pyshell#61>", line 1, in ? print "The temperature is"
作者简介
Magnus Lie Hetland是挪威科技大学副教授,教授算法。喜欢钻研新的编程语言,是Python语言的坚定支持者。他写过很多Python方面的书和在线教程,比如深受大家欢迎的网上教程Instant Python。
目录
第1章 基础知识
1.1 安装Python
1.1.1 Windows
1.1.2 Linux和UNIX
1.1.3 苹果机(Macintosh)

显示全部
用户评论
结构条理都很清晰
复习复习,还行吧....还是要搭配核心库之类的来读...
除了python tutorial之外,最好的python入门书。
某人啊学经济之余看python 大前天给出了道99乘法表 昨晚给出了道画*金字塔
简单易懂 初学者的宝典~
查阅为主
翻译的质量一般,看着很生涩
@2019-01-11 23:53:29
最垃圾的 python 入门书,想靠这本书入门编程根本不可能。直接照抄官方文档?
见第3版评价
收藏