官术网_书友最值得收藏!

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, Assignment and Scoping Rules, we'll expand on our script-writing by using variables to store intermediate results. We'll also look at how objects are created and removed. These rules will lead to an understanding of which variables are visible in which portions of a complex program.

主站蜘蛛池模板: 蕉岭县| 大丰市| 德格县| 洪洞县| 万全县| 武乡县| 灵石县| 满城县| 南投县| 阿拉尔市| 五大连池市| 卢氏县| 共和县| 丹寨县| 汤阴县| 龙南县| 定南县| 富平县| 麻江县| 东至县| 红桥区| 高碑店市| 鄂伦春自治旗| 云安县| 武定县| 达拉特旗| 江安县| 宁陵县| 苍南县| 台安县| 定南县| 昆山市| 龙陵县| 郓城县| 泰安市| 丹江口市| 秦皇岛市| 西丰县| 宜丰县| 竹溪县| 华宁县|