摘要: 【转自】http://www.cnblogs.com/sunyuw/p/4254742.html刚刚从之前的工作中抽身出来。还是应该需要对之前的工作进行一个整理,外加一些遇到的应聘经历的事情。关于老板如果是新人的问题如果老板是新人,并且你的能力强过他而且能够看到他很多不足的地方那么请:离开他除非他开... 阅读全文
posted @ 2015-01-29 14:55 小龙酸菜 阅读(185) 评论(0) 推荐(1) 编辑
摘要: zip函数:同时循环多个同样长的函数,并返回一个包含了每个参数元组对应元素的元组。如果函数并不一致,则采用截取方式,使得返回的结果元组的长度为各个参数元组长度最小值。函式说明:zip(seq1[,seq2[,seq3[...]]])--->[(seq1(0),seq2(0),...),(seq1(1... 阅读全文
posted @ 2014-09-04 13:34 小龙酸菜 阅读(317) 评论(0) 推荐(0) 编辑
摘要: >>> L = [1,2,3]>>> for X in L: # Automatic iteration... print(X ** 2, end=' ') # Obtains iter, calls __next__, catches except... 阅读全文
posted @ 2014-09-03 21:42 小龙酸菜 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Python中的switch>>> choice = 'ham'>>> print({'spam': 1.25,... 'ham': 1.99, # A dictionary-based 'switch'... 'eggs': 0.99, # Us... 阅读全文
posted @ 2014-09-02 16:44 小龙酸菜 阅读(136) 评论(0) 推荐(0) 编辑
摘要: >>> spam, ham = 'yum', 'YUM'>>> spam'yum'>>> ham'YUM'>>> [spam, ham] = ['yum', 'YUM']>>>[spam, ham]['yum', 'YUM']>>> a,b,c,d = 'spam'>>> a's'>>> b&# 阅读全文
posted @ 2014-08-29 20:15 小龙酸菜 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1. 程序由模块构成2. 模块包含语句3. 语句包含表达式4. 表达式建立并处理对象 阅读全文
posted @ 2014-08-29 17:21 小龙酸菜 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 基础:1. 元组由简单对象组构成。2. 元组与列表类似,不过不能在原处修改(它们是不可变的),并且通常写成圆括号(),而不是方框号[]中的一系列项。==========================================================================>>... 阅读全文
posted @ 2014-08-28 21:54 小龙酸菜 阅读(3126) 评论(0) 推荐(0) 编辑
摘要: Python的正则表达式的模块名字是‘re'>>> import re>>> rawString = r'This is a\nnormal string.'>>> rawString'This is a\nnormal string.'>>> string = 'This is a\nnormal... 阅读全文
posted @ 2014-08-28 14:11 小龙酸菜 阅读(131) 评论(0) 推荐(0) 编辑
摘要: >>> D = {'spam': 2, 'ham': 1, 'eggs': 3}>>> list(D.keys())['eggs', 'ham', 'spam']>>> list(D.values())[3, 1, 2]>>> list(D.items())[('eggs', 3), ('ham',... 阅读全文
posted @ 2014-08-27 22:00 小龙酸菜 阅读(148) 评论(0) 推荐(0) 编辑
摘要: >>> L = ['spam', 'Spam', 'SPAM!']>>> L[0:2] = ['eat', 'more']>>> L['eat', 'more', 'SPAM!']========================================>>> L[1:2] = [4,5]>>... 阅读全文
posted @ 2014-08-27 18:06 小龙酸菜 阅读(120) 评论(0) 推荐(0) 编辑