Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
Python语言及其应用(第2版)
by
Bill Lubanovic
March 2022
Intermediate to advanced
522 pages
13h 52m
Chinese
Posts & Telecom Press
Content preview from
Python语言及其应用(第2版)
184
|
第
11
章
11.4
获取其他
Python
代码
有时候,标准库中并没有你想要的东西,或是无法很好地满足需求。没关系,还有开源世
界和第三方
Python
软件。以下是一些不错的资源。
•
PyPi
(也称为
Cheese Shop
,得名自滑稽短剧《巨蟒剧团》
)
•
GitHub
•
readthedocs
可以在
activestate
中找到很多短小的
Python
代码示例。
本书大部分
Python
代
码是使用标准
Python
安装的,其中包括全部的内建函数和标准库。
外部包在部分章节有所涉及:第
1
章提到过
request
,更多细节参见第
18
章。附录
B
展示
了如何安装第三方
Python
软件,以及许多其他具体的开发细节。
11.5
后续内容
第
12
章将进入实战环节,其中涵盖了
Python
数据操作的诸多方面。你会碰到
bytes
和
bytearray
数据类型,处理文本字符串中的
Unicode
字符,以及使用正则表达式搜索文本字
符串。
11.6
练习
1.
创建文件
zoo.py
。先在其中定义函数
hours()
,打印出字符串
'Open 9-5 daily'
。然后
使用交互式解释器导入
zoo
模块并调用
hours()
函数。
2.
在交互式解释器中,把
zoo
模块作为
menagerie
导入并调用其
hours()
函数。
3.
在交互式解释器中直接从
zoo
导入
hours()
函数并调用。
4.
将
hours()
函数作为
info
导入并调用。
5.
使用“键
–
值”对
'a': 1
、
'b': 2
和
'c': 3
创建字典
plain
,然后打印出该字典。
6. ...
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编程入门与实战
Posts & Telecom Press, Fabrizio Romano
Python实用技能学习指南
Posts & Telecom Press, Robert Smallshire, Austin Bingham
Python技术基础视频教程
保罗·J·戴特尔
Python面向对象编程指南
Posts & Telecom Press, Steven F. Lott
Publisher Resources
ISBN: 9787115586223