Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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'


Ïà¹ØÎĵµ£º

»°ËµPython£¨Áù£©Ð¡°×µÄʤÀû

 
    “¹þ¹þ£¡ÖªµÀÎÒ²Ù×÷Ö®ÍõС°×µÄÀ÷º¦Á˰ɣ¡”
    ÿµ±ÖÜÁùÍíÉÏ£¬Ð¡°××ÜÊÇÒª¸úËÞÉáµÄµÜÐÖÌô¼¸¾ÖħÊÞ¡£Æ¾½è×Å·çɧµÄ×ßλºÍâ«ËöµÄÒâʶ£¬Ð¡°××ÜÊÇЦµÀ×îºó¡£Õâ²»£¬Ð¡°×ÓÖÒ»´ÎÈ¡µÃÁËÒÔÒ»µÐ¶þµÄʤÀû¡£
   “Ö÷ÒªÊǶàÏß²Ù×÷£¡”ÕâÊÇС°×¶Ô×Ô¼ºÊ¤ÀûµÄ×ܽ ......

Python ÖÐÎÄ×Ö·û´®µÄ½ØÈ¡

def
subString
(s,
length):
   
us = unicode(s, 'utf-8
')
    gs =
us.encode('gb2312
')
    n = int(length)
   
t = gs[:n]
    while True
:
        try
:
  &nb ......

UBUNTU10.04°²×°stackless pythonÔËÐиßÐÔÄÜ·þÎñÆ÷

ÒÔÏÂ"#"¿ªÍ·ÊÇ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 ......

·ÖÏíÒ»¸ö¼òµ¥µÄpythonÄ£°åÒýÇæ


#coding:utf-
8
  
__author__="sdm"
  
__author_email='sdmzhu3@gmail.com'
  
  
__date__ ="$2009-8-25 21:04:13$"
  
  
''
'  
pytpl ÀàËÆ
phpµÄÄ£°åÀà  
  
&nbs ......

PythonÄÚ²¿µÄÏß³ÌʵÏÖ

ÔÚPythonÖеÄÏß³ÌÔËÐÐʵ¼ÊÊÇÊܵ½InterpreterµÄ¿ØÖÆ»òÕßËµÇ£ÖÆµÄ¡£ÔÚInterpreterµÄºËÐĺ¯Êý
PyObject * PyEval_EvalFrameEx
(PyFrameObject *f, int
throwflag)
ÎÒÃÇ¿ÉÒÔ¿´µ½ÓÐÒ»¸öÈ«¾Ö±äÁ¿_Py_TickerÀ´¿ØÖÆ×ÅÏ̶߳ÔInterpreterµÄÕ¼Óеģ¬Ä¬ÈÏÊÇInterpreterÿִÐÐÒ»°ÙÌõÖ¸Áî¾Í»áÊÍ·ÅÁíÒ»¸öÈ«¾Ö±äÁ¿interpreter_lock.
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ