ModernPythonCookbook - (EPUB全文下载)

文件大小:1.25 mb。
文件格式:epub 格式。
书籍内容:

Modern Python Cookbook
Table of Contents
Modern Python Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Numbers, Strings, and Tuples
Introduction
Creating meaningful names and using variables
Getting ready
How to do it...
Choosing names wisely
Assigning names to objects
How it works...
There's more...
See also
Working with large and small integers
Getting ready
How to do it...
How it works...
There's more...
See also
Choosing between float, decimal, and fraction
Getting ready
How to do it...
Doing currency calculations
Fraction calculations
Floating-point approximations
Converting numbers from one type to another
How it works...
There's more...
See also
Choosing between true division and floor division
Getting ready
How to do it...
Doing floor division
Doing true division
Rational fraction calculations
How it works...
See also
Rewriting an immutable string
Getting ready
How to do it...
Slicing a piece of a string
Updating a string with a replacement
Making a string all lowercase
Removing extra punctuation marks
How it works...
There's more...
See also
String parsing with regular expressions
Getting ready
How to do it...
How it works...
There's more...
See also
Building complex strings with "template".format()
Getting ready
How to do it...
How it works...
There's more...
See also
Building complex strings from lists of characters
Getting ready
How to do it...
How it works...
There's more
See also
Using the Unicode characters that aren't on our keyboards
Getting ready
How to do it...
How it works...
See also
Encoding strings – creating ASCII and UTF-8 bytes
Getting ready
How to do it...
How it works...
See also
Decoding bytes – how to get proper characters from some bytes
Getting ready
How to do it..
How it works...
See also
Using tuples of items
Getting ready
How to do it...
Creating tuples
Extracting items from a tuple
How it works...
There's more
See also...
2. Statements and Syntax
Introduction
Writing Python script and module files – syntax basics
Getting ready
How to do it...
How it works...
There's more...
See also
Writing long lines of code
Getting ready
How to do it...
Using backslash to break a long statement into logical lines
Using the () characters to break a long statement into sensible pieces
Using string literal concatenation
Assi ............

书籍插图:
书籍《ModernPythonCookbook》 - 插图1
书籍《ModernPythonCookbook》 - 插图2

以上为书籍内容预览,如需阅读全文内容请下载EPUB源文件,祝您阅读愉快。

版权声明:书云(openelib.org)是世界上最大的在线非盈利图书馆之一,致力于让每个人都能便捷地了解我们的文明。我们尊重著作者的知识产权,如您认为书云侵犯了您的合法权益,请参考版权保护声明,通过邮件openelib@outlook.com联系我们,我们将及时处理您的合理请求。 数研咨询 流芳阁 研报之家 AI应用导航 研报之家
书云 Open E-Library » ModernPythonCookbook - (EPUB全文下载)