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

Python ×ÖµäʹÓÃÀý×Ó


#!/usr/bin/env python
#coding=utf-8
def buildConnectionString(params):
    return ":".join(["%s=%s" %(k, v) for k, v in params.items()])
if __name__ == "__main__":
    myParams = {"server":"mpilgrim", \
                "database":"master", \
                "uid":"sa", \
                "pwd":"secret"\
                }
    print buildConnectionString(myParams)
    print __name__


Ïà¹ØÎĵµ£º

Python Ï̱߳à³Ì


ÎÒÃÇÔÚ×öÈí¼þ¿ª·¢µÄʱºòºÜ¶àÒªÓõ½¶àÏ̼߳¼Êõ¡£ÀýÈçÈç¹û×öÒ»¸öÏÂÔØÈí¼þÏóflashget¾ÍÒªÓõ½¡¢ÏóÔÚÏßÊÓƵ¹¤¾ßrealplayerÒ²ÒªÓõ½ÒòΪҪͬʱÏÂÔØmedia stream»¹Òª²¥·Å¡£ÆäʵÀý×ÓÊǺܶàµÄ¡£
Ïß³ÌÏà¶Ô½ø³ÌÀ´ËµÊÇ“ÇáÁ¿¼¶”µÄ£¬²Ù×÷ϵͳÓýÏÉÙµÄ×ÊÔ´´´½¨ºÍ¹ÜÀíÏ̡߳£³ÌÐòÖеÄÏß³ÌÔÚÏàͬµÄÄÚ´æ¿Õ¼äÖÐÖ´ÐУ¬²¢¹²ÏíÐí¶à ......

Python Ïß³Ìͬ²½¶ÓÁÐ

ÎÒÃǾ­³£»á²ÉÓÃÉú²úÕß/Ïû·ÑÕß¹ØϵµÄÁ½¸öÏß³ÌÀ´´¦ÀíÒ»¸ö¹²Ïí»º³åÇøµÄÊý¾Ý¡£ÀýÈçÒ»¸öÉú²úÕßÏ߳̽ÓÊÜÓû§Êý¾Ý·ÅÈëÒ»¸ö¹²Ïí»º³åÇøÀµÈ´ýÒ»¸öÏû·ÑÕßÏß
³Ì¶ÔÊý¾ÝÈ¡³ö´¦Àí¡£µ«ÊÇÈç¹û»º³åÇøµÄ̫С¶øÉú²úÕߺÍÏû·ÑÕßÁ½¸öÒì²½Ï̵߳ÄËٶȲ»Í¬Ê±£¬ÈÝÒ׳öÏÖÒ»¸öÏ̵߳ȴýÁíÒ»¸öÇé¿ö¡£ÎªÁ˾¡¿ÉÄܵÄËõ¶Ì¹²Ïí×ÊÔ´²¢ÒÔÏàͬ
Ëٶȹ¤×÷µÄ¸÷Ïß³ ......

pythonË㷨ʵ¼ù3 ðÅÝÅÅÐò

#ðÅÝÅÅÐò
def BubbleSort(mylist):
n = len(mylist)
i = 0
j = 0
bExchange = False
for i in range(1, n):
bExchange = False
j = n - 1
while j >= i:
if mylist[j] < mylist[j - 1]:
tmp = mylist[j]
myli ......

pythonË㷨ʵ¼ù6 ¶ÑÅÅÐò

#¶ÑÅÅÐò
def Heapify(mylist, start, end):
left = 0
right = 0
maxv = 0
left = start * 2
right = start * 2 + 1
while left <= end:
maxv = left
if right <= end:
if mylist[left] < mylist[right]:
maxv = right
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ