Ex23:
讲解了计算机的encode 和 decode原理。
ASCII only encode English and a few other similar languages. Different contries using different languages ,so people create Unicode to solve the problem. The convention for encoding text in Python is called "utf-8", which means "Unicode Transformation Format 8 Bits."
Ex24:
对之前知识的复习(主要是print)
Ex25:
仍是之前知识的复习,但主要设计函数和功能。
在python里执行(you can type Python code in, and it will run immediately)
Python 3.6.0rc2 (v3.6.0rc2:800a67f7806d, Dec 16 2016, 14:12:21)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ex25
Study Drills
- Typing ex25. is annoying. A shortcut is to do your import like this: from ex25 import * which is like saying, "Import everything from ex25." Programmers like saying things backward. Start a new session and see how all your functions are right there.
- Try doing this: help(ex25) and also help(ex25.break_words).Notice how you get help for your module and how the help is those odd """ strings you put after each function in ex25? Those special strings are called documentation comments, and we'll be seeing more of them.
Ex26:
期中考试,完成起来很快,但发现对前面的一些内容有遗忘,比如说file部分,还不是很熟悉,需要加强。