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

×î¼òµ¥µÄ python ¶àÏß³ÌʾÀý

import time,thread
def test(a,b):
for i in range(a,b):
       time.sleep(1)
       print i
def start():
thread.start_new_thread(test,(1,1001))
thread.start_new_thread(test,(1000,2001))
if __name__=='__main__':
start()


Ïà¹ØÎĵµ£º

Pythonѧϰ×ÊÁÏ


Pythonѧϰ
 
»ù±¾ÄÚÈÝ
Python»ù±¾°²×°£º
http://www.python.org/ ¹Ù·½±ê×¼Python¿ª·¢°üºÍÖ§³Ö»·¾³£¬Í¬Ê±Ò²ÊÇPythonµÄ¹Ù·½ÍøÕ¾£»
http://www.activestate.com/ ¼¯³É¶à¸öÓÐÓòå¼þµÄÇ¿´ó·Ç¹Ù·½°æ±¾£¬ÌرðÊÇÕë¶ÔWindows»·¾³Óв»ÉٸĽø£»
 
PythonÎĵµ£º
http://www.python.org/doc/current/lib/ ......

PythonÏ̱߳à³Ì£¨¶þ£©Ïß³Ìͬ²½

¶à¸öÖ´ÐÐÏ߳̾­³£Òª¹²ÏíÊý¾Ý£¬Èç¹û½ö½ö¶ÁÈ¡¹²ÏíÊý¾Ý»¹ºÃ£¬µ«ÊÇÈç¹û¶à¸öÏß³ÌÒªÐ޸Ĺ²ÏíÊý¾ÝµÄ»°¾Í¿ÉÄܳöÏÖÎÞ·¨Ô¤ÁϵĽá¹û¡£
    ¼ÙÈçÁ½¸öÏ̶߳ÔÏót1ºÍt2¶¼Òª¶ÔÊýÖµnum=0½øÐÐÔö1ÔËË㣬ÄÇôt1ºÍt2¶¼¸÷¶ÔnumÐÞ¸Ä10´ÎµÄ»°£¬ÄÇônum×îÖյĽá¹ûÓ¦¸ÃΪ20¡£µ«ÊÇÈç¹ûµ±t1È¡µÃnumµÄֵʱ£¨¼ÙÈç´ËʱnumΪ0£©£¬ÏµÍ³°Ñt1µ ......

PythonÖÐÓÐȤµÄ±äÁ¿¸³Öµ

PythonÓïÑÔÖУ¬Á¬±äÁ¿ºÍËüµÄ¸³Öµ¶¼ÊǺÜÓÐÒâ˼µÄÊÂÇé¡£
ÄãÖ»ÐèÒªÔÚʹÓÃËüµÄʱºòÈÓ¸øËüÒ»¸öÖµ£¬È»ºóÔÚËüµÄ×÷ÓÃÓòÄÚʹÓÃËü¡£ÆäËûµÄÊÂÇé²»ÐèÒªµ£ÐÄ¡£python½âÊÍÆ÷»áÍê³ÉʣϵÄÊÂÇé¡£
1. >>>x = 1
2. >>>x
3. 1
4. >>>
µ±È»Ä㻹¿ÉÒÔÏÔʽµÄɾ³ýËü£¬µ«ÔÚÕâÖ®ºóÄã¾Í²»ÄÜÔÙÒýÓÃÕ⸠......

python ¶à¼Ì³Ð

 from: http://www.cnblogs.com/dahuzizyd/archive/2005/03/01/111006.html
pythonÖ§³ÖÃæÏò¶ÔÏóµÄ±à³Ì·ç¸ñ£¬ÕâÀïÖ÷Ҫ˵˵pythonÖеĶà¼Ì³Ð£º
ÏÂÃæµÄ´úÂëʹÓÃpython2.4£¬°²×°ºóʹÓÃidleµÄIDE¿ª·¢»·¾³£¨ËµÊÇIDE £¬±ÈÆðdelphi,VS.netµÈ¼òµ¥µÃÌ«¶àÁË)
´ÓFile-New²Ëµ¥½¨Á¢Ò»¸ö.pyÎļþ£¬Ð´ÏÂÃæµÄ´úÂ룺
class SuperCl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ