泡沫

博客园 首页 联系 订阅 管理

2013年5月19日

摘要: 编写一个类,具有栈和队列的功能。实现以下4个方法:shit() 返回并删除列表中第一个元素unshit() 在列表的头部‘压入’一个新的元素push() 在列表尾部增加一个元素pop() 返回并删除最后一个元素outAllData() 输出所有的数据class stackAndQueue(object): data = [] def isEmpty(self): return len(self.data)==0 def shift(self): if stackAndQueue.isEmpty(self): print 'th... 阅读全文
posted @ 2013-05-19 21:41 木-天空 阅读(522) 评论(0) 推荐(0) 编辑

摘要: python性能鸡汤之一 http://bbs.python123.com/forum.php?mod=viewthread&tid=42&extra=page%3D1&ordertype=2python性能鸡汤之二 http://www.python123.com/thread-43-1-1.htmlpython itertools 模块 http://www.cnblogs.com/cython/articles/2169009.htmlpython线程基础 http://tieba.baidu.com/p/1072881148学习pygame http://cs. 阅读全文
posted @ 2013-05-19 11:30 木-天空 阅读(391) 评论(0) 推荐(0) 编辑