python joinµÄÓ÷¨
>>> a="abcd"
>>> ",".join(a)
'a,b,c,d'
>>> "|".join(['a','b','c'])
'a|b|c'
>>> ",".join(('a','b','c'))
'a,b,c'
>>> ",".join({'a':1,'b':2,'c':3})
'a,c,b'
Ïà¹ØÎĵµ£º
“¹þ¹þ£¡ÖªµÀÎÒ²Ù×÷Ö®ÍõС°×µÄÀ÷º¦Á˰ɣ¡”
ÿµ±ÖÜÁùÍíÉÏ£¬Ð¡°××ÜÊÇÒª¸úËÞÉáµÄµÜÐÖÌô¼¸¾ÖħÊÞ¡£Æ¾½è×Å·çɧµÄ×ßλºÍâ«ËöµÄÒâʶ£¬Ð¡°××ÜÊÇЦµÀ×îºó¡£Õâ²»£¬Ð¡°×ÓÖÒ»´ÎÈ¡µÃÁËÒÔÒ»µÐ¶þµÄʤÀû¡£
“Ö÷ÒªÊǶàÏß²Ù×÷£¡”ÕâÊÇС°×¶Ô×Ô¼ºÊ¤ÀûµÄ×ܽ ......
def
subString
(s,
length):
us = unicode(s, 'utf-8
')
gs =
us.encode('gb2312
')
n = int(length)
t = gs[:n]
while True
:
try
:
&nb ......
ÒÔÏÂ"#"¿ªÍ·ÊÇUbuntuÖÕ¶ËÃüÁî
1¡£Ê×ÏȰ²×°Ubuntu10.04
²Î¿¼ http://wiki.ubuntu.org.cn/
2¡£ÐÞ¸ÄrootÓû§ÃÜÂë
3¡£Ê¹ÓÃrootµÇ½ϵͳ
4¡£UbuntuĬÈÏÒѾ°²×°python2.6.5
5¡£ÏÂÔØstackless
²é¿´ÍøÖ· http://zope.stackless.com/download/sdocument_view
# cd /usr/src
# wget http://www.sta ......
#coding:utf-
8
__author__="sdm"
__author_email='sdmzhu3@gmail.com'
__date__ ="$2009-8-25 21:04:13$"
''
'
pytpl ÀàËÆ
phpµÄÄ£°åÀà
&nbs ......
ÔÚPythonÖеÄÏß³ÌÔËÐÐʵ¼ÊÊÇÊܵ½InterpreterµÄ¿ØÖÆ»òÕßËµÇ£ÖÆµÄ¡£ÔÚInterpreterµÄºËÐĺ¯Êý
PyObject * PyEval_EvalFrameEx
(PyFrameObject *f, int
throwflag)
ÎÒÃÇ¿ÉÒÔ¿´µ½ÓÐÒ»¸öÈ«¾Ö±äÁ¿_Py_TickerÀ´¿ØÖÆ×ÅÏ̶߳ÔInterpreterµÄÕ¼Óеģ¬Ä¬ÈÏÊÇInterpreterÿִÐÐÒ»°ÙÌõÖ¸Áî¾Í»áÊÍ·ÅÁíÒ»¸öÈ«¾Ö±äÁ¿interpreter_lock.
......