learn python the hard way (personal) -- Ex23-

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

  1. 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.
  2. 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部分,还不是很熟悉,需要加强。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值