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

pythonÁ½¸ödictÏà¼Ó


>>> a = {'1':'2'}
>>> b = {'3':'4'}
>>> a+b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'dict' and 'dict'
>>> a.update(b)
>>> a
{'1': '2', '3': '4'}
>>>
¸Ã·½·¨°ÑbµÄÔªËØ¼ÓÈëµ½aÖÐÈ¥£¬¼ü×ÖÖØ¸´Ê±»á¸²¸ÇaÖеļüÖµ


Ïà¹ØÎĵµ£º

Python Socket ±à³Ì

client:
import socket, sys
if __name__ == '__main__':
    #´¦Àí²ÎÊý
    argv = sys.argv
    if (len(argv)!=3) or (len(argv)==2 and argv[1]=='/?'):
        print '>>>Useage:', argv[0], '<address> < ......

Python ¶¨Ê±ÔËÐнű¾

import sys
import os
import datetime
import time
class ArgsDealwith:
   
    def arg_environment(self, args):
        filepath = ('PYTHON_PATH', 'path')
        for i in filepath:
 &nbs ......

Python×Ö·û´®±àÂë

ÔÚPythonÖÐÓÐÐ©ÌØÊâµÄµØ·½ÊÇ´æÔÚÁ½ÖÖ×Ö·û´®£¬·Ö±ðΪstrºÍunicode×Ö·û´®£¬ËûÃǶ¼¼Ì³Ð×Ôbasestring¡£
È磺s="hello world"£¬sΪstr£»us=u"hello world"£¬usΪunicode¡£
ʹÓÃhelp(str)ºÍhelp(unicode)¿ÉÒԲ鿴¸÷×Ô˵Ã÷£¬ËûÃǶ¼ÓÐdecode¡¢encode·½·¨£¬
decodeÓÃÓÚ½«str×Ö·û´®½âÂëΪunicode×Ö·û´®£¬
encodeÓÃÓÚ½«unicode×Ö·û ......

pythonѧϰ

     ÔÚpythonÖУ¬ÈκÎÊý¾ÝÀàÐͶ¼ÊÇ“¶ÔÏ󔣬°üÀ¨pythonÌṩµÄÄÚÖöÔÏó£¬Ò²°üÀ¨Óû§Í¨¹ýpythonÓïÑÔ»òÕßCÀ©Õ¹¿â´´½¨µÄ¶ÔÏó¡£
     pythonµÄ¶ÔÏóÊǶ¯Ì¬ÀàÐÍ£¬¶øÇÒÊÇÇ¿ÀàÐÍ£¬ÕâÒâζ×ÅÖ»ÓÐÀàÐÍÆ¥ÅäµÄʱºò²ÅÄܽøÐÐÏàÓ¦µÄ²Ù×÷¡£ÏÖÔÚ£¬ÎÒÃÇÀ´Ñ§Ï°pythonµÄÄÚÖöÔÏó£¬pythonµÄÄ ......

¡¶PythonÓïÑÔÈëÃÅ¡·µÚ¾ÅÕÂÁÙʱС½Ú

ѧϰÁ˵ڰËÕº󣬽ôÂàÃܹĵĿªÊ¼µÚ¾ÅÕµÄѧϰ¡£
ѧϰÁË“Êý¾Ý½á¹¹²Ù×÷”£¬Ñ§Ï°ÁË“Îļþ²Ù×÷”¡£“Êý¾Ý½á¹¹²Ù×÷”»¹±È½ÏÓÐÒâ˼£¬¿´µÃ¶®¡£“Îļþ²Ù×÷”¾Í¿ªÊ¼Í·»è»èµÄ£¬ÏñÄÔ×Ó½øÁ˽¬ºý¡£
ºÃ²»ÈÝÒ׿´µ½“²Ù×÷³ÌÐò”£¬²Å·¢ÏÖ“²Ù×÷³ÌÐò”ÕâÒ»½ÚµÄÄÚÈݲ¢²»ÊÇÎÒËù ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ