Book Image

Python Essentials

By : Steven F. Lott
Book Image

Python Essentials

By: Steven F. Lott

Overview of this book

Table of Contents (22 chapters)
Python Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we've reviewed the essential numeric types and the operators available on Python. We've looked at some expressions that involve a mixture of string and numeric data.

In order to view the output from our scripts, we've looked at the print() function. This is used widely to produce output. The print() function is a very handy tool for debugging particularly complex functions or classes.

Additionally, we've looked at how we can use the str.format() method to produce elaborately formatted data. This gives us a wide variety of techniques for converting Python objects to strings that can be displayed. We've also looked at some ways that we can parse strings using string method functions such as split() and partition().

Beyond the basics of string processing, we've looked at how we can use the re module to match, search, and parse strings. This module is sophisticated and has a large number of features for extracting useful information from input strings.

In Chapter 4, Variables...