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

PythonÊý¾Ý½á¹¹Ö®——list

     PythonÖÐÓÐËÄÖÖÄÚ½¨µÄÊý¾Ý½á¹¹£ºList£¬Tuple£¬Dictionary£¬Set¡£±¾ÎÄÖ÷Òª½éÉÜList¡£
     ListÊÇÓÃÀ´´æ·ÅÒ»×é¶ÔÏóÐòÁС£¿ÉÒÔÏñlistÖÐÌí¼ÓÔªËØ¡¢É¾³ýÔªËØ£¬Í¬Ê±Ò²¿ÉÒÔÏñ·ÃÎÊÊý×éÒ»Ñù·ÃÎÊlist¡£ListÊǿɱäµÄÊý¾ÝÀàÐÍ¡£
    ÏÂÃæ£¬¸ø³öÒ»×élistµÄʹÓÃʵÀý£º
     shoplist = ['rice','apple','banana','mango']
print('I hava ',len(shoplist),' items to purchase')
print('These items are:',end=' ')
for item in shoplist:
print(item,end=' ')
print('\nI also have to buy carrot')
shoplist.append('carrot')
print('My shoplist now is: ',shoplist)
shoplist.sort()
print('My shoplist after sorted is: ',shoplist)
del shoplist[1]
print('My shoplist after del is: ',shoplist)
shoplist.reverse()
print('My shoplist after reversed is: ',shoplist)
shoplist.remove('rice')
print('My shoplist after remove is: ',shoplist)

     Ê×ÏÈ£¬¿ÉÒÔʹÓÓ[]”À´´´½¨Ò»¸ölist£¬²¢¿ÉÒÔÖ±½Ó¶ÔÆä½øÐгõʼ»¯£»¿ÉÒÔʹÓÃfor..inÓï·¨À´µü´ú·ÃÎÊlist£»¿ÉÒÔʹÓÃappend·½·¨À´ÏòlistÖÐÌí¼ÓÔªËØ£»¿ÉÒÔʹÓÃremove·½·¨´ÓlistÖÐÒÆ³ýÔªËØ£»¿ÉÒÔʹÓÃdelÀ´´ÓlistÖÐɾ³ýÖ¸¶¨Ë÷ÒýµÄÔªËØ£»¿ÉÒÔʹÓÃsort·½·¨À´¶Ôlist½øÐÐÕýÐòµÄÅÅÐò£¬ÔÚÕâÀÐèҪעÒâµÄÊǸ÷½·¨²»·µ»ØÖµ£¬¶øÊÇÖ±½Ó¸Ä±älist±¾Éí£»¿ÉÒÔʹÓÃreverse·½·¨À´µ¹ÖÃlistÖеÄÔªËØ¡£
     ¹ØÓÚlistµÄ½øÒ»²½Ê¹Ó㬿ÉÒÔʹÓÃhelp(list)À´²é¿´¡£


Ïà¹ØÎĵµ£º

PamieÄ£¿éÏê½â python²Ù×÷ieä¯ÀÀÆ÷

from http://blog.alexa-pro.cn/?p=315
´ËÎĵµÊ¹ÓÃÆ½Ì¨Îª cPAMIE Build 2.0,ºÍ֮ǰµÄ°æ±¾ÓÐÃ÷ÏԵIJî±ð,¾ßÌå¿ÉÖ±½Ó¿´cPAMIE.py Ô´Âë
ÏÂÃæÊÇһЩ³£Óõķ½·¨
ie.navigate('http://blog.alexa.cn') ÓÃÀ´·ÃÎÊÒ»¸öÁ´½Ó¡£
ie.linkClick('linkname') ´ò¿ªÕâ¸öÒ³ÃæÖеÄÒ»¸öÁ¬½Ó ²ÎÊý: name»ò id
ie.textBoxSet('labels','python ......

PythonÎļþ²Ù×÷ ´ò¿ª,¶ÁÈ¡,¹Ø±Õ

http://blog.alexa-pro.cn/?p=197
1.´ò¿ªÎļþ´úÂëÈçÏ£º
>>> f = open(”d:test.txt”, “w”)
˵Ã÷£ºµÚÒ»¸ö²ÎÊýÊÇÎļþÃû³Æ£¬°üÀ¨Â·¾¶£»µÚ¶þ¸ö²ÎÊýÊÇ´ò¿ªµÄģʽmode’r'£ºÖ»¶Á£¨È±Ê¡¡£Èç¹ûÎļþ²»´æÔÚ£¬ÔòÅ׳ö´íÎ󣩒w'£ºÖ»Ð´£¨Èç¹ûÎļþ ²»´æÔÚ£¬Ôò×Ô¶¯´´½¨Îļþ£©’a'£º¸½¼ ......

python udp c/s ¼Ç¼

server:
import sys
import socket
host = sys.argv[1]
port = int(sys.argv[2])
 
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 
s.bind((host,port))
 
while 1:
    try:
   &n ......

°²×°mysqldb 1.2.2 for python 2.6

°²×°ÎļþÏÂÔØ:
MySQL-python-1.2.2.win32-py2.6.exe
https://docs.google.com/leaf?id=0B-C0ABoe2nuLMDlhZjI5OTQtMWNmYy00ZTNlLWJjNzMtYTc2Y2EzMGFjMzcy&hl=zh_CN
ÐèÒªµÄ¶îÍâdllÎļþÏÂÔØ:
libmmd.dll
https://docs.google.com/leaf?id=0B-C0ABoe2nuLZTk2M2RiZTAtYzY5My00NzNjLTg5ZWEtMzRkZGEyYjUxNThh&hl=zh_C ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ