Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

jagne kvrj, ngochan1126@hotmail.­com, a asdfghjhhjjkl', cvezrtg, chink chinese frankies, lambhead@rocketmail.com, priwalfdept77@yahoo.de, from scipy.optimize import minpack2 ImportError: DLL load failed: 找不到指定的模块。, yamlå, adfghjshjklç

Links

XODOX
Impressum

#1: 请教[[]] * N 与 [ [] for i in range(N) ]的区别

Posted on 2012-09-10 02:08:14 by My木头人

å¨append()ä¹åï¼list_0 ä¸ list_1æ¯ä¸æ ·çï¼ä¸ºå¥append()çç»æä¸ä¸æ ·ã
print 'list_0'
list_0 = [[]] * 3
print list_0
print len(list_0)
list_0[0].append(11)
list_0[1].append(22)
print list_0

print 'list_1'
list_1 = [[] for i in range(3)]
print list_1
print len(list_1)
list_1[0].append(11)
list_1[1].append(22)
print list_1

#---------------------------console--------------------
list_0
[[], [], []]
3
[[11, 22], [11, 22], [11, 22]]

list_1
[[], [], []]
3
[[11], [22], []]



--

â» æ¥æº:ã»æ°´æ¨ç¤¾åº http://newsmth.netã»

Report this message

#2: Re: 请教[[]] * N 与 [ [] for i in range(N) ]的区别

Posted on 2012-09-10 02:14:03 by My木头人

print id(list_0[0]),
print id(list_0[1]),
print id(list_0[2])
#--------console----------
19175624 19175624 19175624


print id(list_1[0]),
print id(list_1[1]),
print id(list_1[2])
#--------console----------
19181896 19182656 19182176

[[]] * N 中çå个[] çid()å¼æ¯ä¸æ ·çã
--

â» æ¥æº:ã»æ°´æ¨ç¤¾åº http://newsmth.netã»

Report this message

#3: Re: pypy的价值是啥?

Posted on 2012-09-10 03:40:41 by freealbert

å¯ï¼è¯·é®ä¸éå¨åªéï¼ç©¶ç«æ¯æä¹æ ·åå°çï¼
ææ³äºè§£ä¸ä¸è¿åï¼å¯ä»¥ä»åªäºèµæ/æ¹é¢ä¸æï¼ææ¨èçåï¼
ã å¨ CPYTHON ç大ä½ä¸­æå°: ã
: é~

--

â» æ¥æº:ã»æ°´æ¨ç¤¾åº http://newsmth.netã»

Report this message

#4: Re: 网上有神马svn代码仓库?

Posted on 2012-09-10 03:54:24 by est

ãããããããããè¿ä¸ªãããããããã


githubæ¯æsvn客æ·ç«¯çã



ã å¨ bigmeow (bigmeow) ç大ä½ä¸­æå°: ã
: svnæ¯git强大ï¼ï¼

--

â» æ¥æº:ã»æ°´æ¨ç¤¾åº http://newsmth.netã»

Report this message