![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笨办法学Python
Vchnun
这个作者很懒,什么都没留下…
展开
-
Learn Python the hard way 习题48
#_*_coding:utf-8_*_class lexicon(object): def __init__(self): # dictionary to find word on self.directions = ['south', 'north', 'east', 'west'] self.verbs = ['go', 'kill', 'eat'] self.stop原创 2017-03-28 08:56:22 · 507 阅读 · 0 评论 -
Learn Python the hard way 习题49
这个练习是自己写测试了。按照函数一个个写,好像有点长了from nose.tools import *from Game import parserfrom Game.lexicon import lexiconlexi = lexicon.scan("fighter kill bear")sen = parser.Sentence(lexi[0], lexi[1], lexi[2]原创 2017-03-28 22:17:38 · 1181 阅读 · 0 评论