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

ѧϰ¡¶PythonÓïÑÔÈëÃÅ¡·µÚËÄÕ º¯Êý


ÔõôÕÒ²»µ½µÚÈýÕµÄѧϰ±Ê¼ÇÁË£¿¶ªÁË£¿
PythonµÄº¯ÊýûÓÐʲôµÄ£¬¿ÉÒÔ˵£¬¿´ÁË¡¶¼òÃ÷Python½Ì³Ì¡·ºó£¬¾Í»áдÁË¡£
ÕâÒ»ÕÂÌṩµÄÄÚÈÝÒ²±È¡¶¼òÃ÷Python½Ì³Ì¡·Òª¶àһЩ¡£±È½Ï¸´ÔÓµÄÊÇ×÷ÓÃÓò¹æÔò£¬²»ÖªµÀÊÇÊéû½²Çå³þ»¹ÊÇ·­ÒëµÃ²»ºÃ£¬±È½ÏÄѶ®¡£Ç®Äܵġ¶C++³ÌÐò½Ì³Ì¡·¹ØÓÚº¯ÊýµÄ×÷ÓÃÓò¹æÔò½²µÃÒªÇå³þЩ£¬ÓÐC++µÄ֪ʶÔÚÀïÃæ£¬Àí½âPythonµÄº¯Êý×÷ÓÃÓò¹æÔò£¬ºÃ¶®ºÜ¶à¡£ËƺõÁ½ÕßҲûÓÐÊ²Ã´Çø±ð¡£
º¯Êý²ÎÊý·½ÃæÓÐЩ²»Ò»Ñù£¬C++µÄÖµ´«µÝ¡¢Ö¸Õë´«µÝ¡¢ÒýÓô«µÝ·ÖµÃºÜÇå³þ¡£¶øPythonµÄ²ÎÊý´«µÝÓÐЩ²»Äܸıä²ÎÊýµÄÖµ£¬ÓÐЩÊÇ¿ÉÒԵġ£ÐèҪСÐĵĶԸ¶¡£»¹Óйؼü×ֵIJÎÊý¡¢¿É±ä²ÎÊý£¬¶¼ÊÇC++ûÓеÄÄÚÈÝ¡£PythonµÄº¯Êý¿ÉÒÔ²»ÓÃreturn£¬µ«ÊǺóÃæµÄÉè¼Æ¸ÅÄÊǽ¨ÒéÒªÓÃreturn·µ»Ø¡£
lambda¡¢map¡¢applyÕâЩ¹¤¾ßºÜ·½±ã£¬Óнű¾µÄÓ°×ÓÔÚÀïÃæ¡£
×îÈÃÎÒ¾ªÆæµÄÊÇ“º¯ÊýÊǶÔÏó: ·ÇÖ±½Óµ÷ÓÔÕâһС½Ú¡£PythonÖк¯ÊýµÄÁé»îÊÇC++Ëù²»¿É±ÈµÄ¡£PythonµÄº¯Êý¾ÍÏñһСÍÅÕ³ÍÁÒ»Ñù£¬¿ÉÒÔÈà¹ýÀ´´ê¹ýÈ¥µÄʹÓá£
“º¯Êý³£¼ûµÄÎÊÌâ”ȷʵÈÃÎÒÕâ¸öÐÂÊÖÃÔºýÁË£¬ÔÝʱÏȲ»ÌáËüÃǰɡ£¶øÇÒÕâÒ»½ÚÀïÃæµÄÀý×ÓËÆºõÓÐÎÊÌ⣬ÓÐһЩÊéÉÏ˵²»ÄÜÔËÐУ¬µ«ÔÚÎÒµÄPythonÖÐÈ´ÄÜÔËÐУ»ÁíÓÐһЩ˵ÄÜÔËÐУ¬µ«ÎÒÔËÐгö´í¡£ÊDz»ÊÇPythonµÄ°æ±¾¸üµü¸Ä±äÁËһЩ¶«Î÷£¿ÕâÒ»½ÚµÄÄÚÈÝ»¹ÊÊÓÃÂð£¿


Ïà¹ØÎĵµ£º

PythonÈëÃŵÄ36¸öÀý×Ó Ö® 35

Ô´´úÂëÏÂÔØ£ºÏÂÔØµØÖ·ÔÚÕâÀï
# 039
while True:
try:
x = int(raw_input('Input a number:'))
y = int(raw_input('Input a number:'))
z = x / y
except ValueError, ev:
print 'That is not a valid number.', ev
except ZeroDivisionError, ez:
print 'Di ......

´©Ô½Python Challenge

 µÚ¾Å¹Ø Image
    ´ÓÒ³ÃæÉϵÄͼƬ¿ÉÒÔ¿´µ½ÓÐÒ»´®µã£¬ÄÇôÊDz»ÊÇ´ú±í¸Ã¹ØÓëͼÏñµãÓйأ¿ ÎÒÃÇ´ÓÒ³ÃæÔ´Âë¿ÉÒÔ¿´µ½£¬ÓÐÁ½¶ÎÊý×ÖÐòÁÐfirstºÍsecond£¬¶øÓÐÒ»¸öÌáʾfirst+second=? ʲôÒâË¼ÄØ£¿ÄѵÀÊÇ˵(first, second)´ú±íÁËͼÏñµãµÄ×ø±ê£¿²»Ïñ£¬Á½¶ÎÐòÁеij¤¶ÈÓкܴó²îÒì¡£ÄÇôËã·û+»¹ÓÐʲôº¬ÒåÄØ£¬Óп ......

PythonÄ£¿éѧϰ

¡¡¡¡copyÄ£¿éÓÃÓÚ¶ÔÏóµÄ¿½±´²Ù×÷¡£¸ÃÄ£¿é·Ç³£¼òµ¥£¬Ö»ÌṩÁËÁ½¸öÖ÷ÒªµÄ·½·¨£º
copy.copy
Óë
copy.deepcopy
£¬·Ö±ð±íʾdz¸´ÖÆÓëÉî¸´ÖÆ¡£Ê²Ã´ÊÇdz¸´ÖÆ£¬Ê²Ã´ÊÇÉî¸´ÖÆ£¬ÍøÉÏÓÐÒ»¿¨³µÒ»¿¨³µµÄ×ÊÁÏ£¬ÕâÀï²»×÷Ïêϸ½éÉÜ¡£¸´ÖƲÙ×÷Ö»¶Ô¸´ºÏ¶ÔÏóÓÐЧ¡£Óüòµ¥µÄÀý×ÓÀ´·Ö±ð½éÉÜÕâÁ½¸ö·½·¨¡£
dz¸´ÖÆÖ»¸´ÖƶÔÏó±¾Éí£¬Ã»Óи´ÖƸöÔÏó ......

python stringºÍPyQtµÄQStringµÄÇø±ð

python stringºÍPyQtµÄQStringµÄÇø±ð ÒÔÏÂÔÚPython2.6ºÍPyQt4.4.4 for
Python2,6»·¾³ÏÂÌÖÂÛ£º PythonÖÐÓÐÁ½ÖÖÓйØ×Ö·ûµÄÀàÐÍ£ºPython string objectºÍPython Unicode
object¡£Ö÷ҪʹÓÃPython string object½øÐÐÊý¾ÝÊäÈëÊä³ö¡£ PyQtÖÐÓëÖ®Ïà¶ÔÓ¦µÄ×Ö·ûÓйØÀà
python stringºÍPyQtµÄQStringµÄÇø±ð
ÒÔÏÂÔÚPython2.6ºÍPyQt4 ......

Python¿âÏê½âÖ®ÍøÂç(2)

×òÌìÊÔÁËÏÂÓÃHTMLParserÀàÀ´½âÎöÍøÒ³£¬¿É·¢ÏÖ½á¹û²¢²»ÀíÏë¡£²»¹ÜÔõô˵£¬ÏÈдϹý³Ì£¬Ï£ÍûºóÀ´ÈËÄÜÔÚ´Ë»ù´¡ÉϽâ¾öÎÒËùÓöµ½µÄÎÊÌâ¡£
дÁË2Ì×½â¾ö·½°¸£¬µ±È»Õâ2Ì×Ö»ÄܶÔÌØ¶¨ÍøÕ¾ÓÐЧ¡£ÎÒÕâÀïÖ÷Ҫ˵Ã÷϶ÔBBCÖ÷Ò³www.bbc.co.ukºÍ¶ÔÍøÒ×www.163.comµÄ½âÎö¡£
¶ÔÓÚBBC£º
ÕâÌ×Òª¼òµ¥µÃ¶à£¬¿ÉÄÜÊǸÃÍøÒ³µÄ±àÂë±È½Ï±ê×¼°É
import ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ