- 博客(9)
- 收藏
- 关注
原创 Rice- IIIP (2)
avoid unnamed constant在codesculptor直接运行Mac: Alt-Left/Right Windows: Ctrl-Left/Right move by wordselecting line shift+down
2015-08-01 19:48:48 488
转载 python for else primers
>>> for n in range(2, 10):... for x in range(2, n):... if n % x == 0:... print n, 'equals', x, '*', n/x... break... else:... print n, 'is a prime n
2015-07-30 08:09:07 354
转载 python list to string
["a", "b", "c", “d“]转换成abcd"".join(s)Use the join method of the empty string to join all of the strings together with the empty string in between, like so:>>> a = ['a', 'b', 'c', '
2015-07-30 01:03:42 672
转载 python 字典合并
dict1={1:[1,11,111],2:[2,22,222]}dict2={3:[3,33,333],4:[4,44,444]}合并两个字典得到类似{1:[1,11,111],2:[2,22,222],3:[3,33,333],4:[4,44,444]}方法1:dictMerged1=dict(dict1.items()+dict2.items())方法2:
2015-07-30 00:44:18 344
转载 程序员必读书单 1.0
作者:Lucida微博:@peng_gong豆瓣:@figure9原文链接:http://lucida.me/blog/developer-reading-list/本文把程序员所需掌握的关键知识总结为三大类19个关键概念,然后给出了掌握每个关键概念所需的入门书籍,必读书籍,以及延伸阅读。旨在成为最好最全面的程序员必读书单。前言Reading m
2015-07-29 23:43:41 916
转载 What does __init__ == __main__ mean?
When your script is run by passing it as a command to the Python interpreter,python myscript.pyall of the code that is at indentation level 0 gets executed. Functions and classes that are define
2015-07-29 23:33:54 609
原创 2015年7月29日
看的好少。打断太多。PythonMIT-6.00.1x week 6 构建classclass的层级 多层类,When resolving a reference to an attribute of an object that’s an instance of class D, Python first searches the object’s instance variables t
2015-07-29 20:39:03 252
原创 MIT-6.00.1x-L11-P6
class Queue(object): def __init__(self): self.queue = [] def insert(self,e): self.queue.append(e) def remove(self): try: return self.queue.pop() exc
2015-07-29 15:57:04 578
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人