Python »ù´¡2
8.PythonÖÐûÓÐswitchÓï¾ä,¿ÉÒÔÓÃif..elif..elseÓï¾äÍê³ÉͬÑùµÄ¹¤×÷(ijЩ³¡ºÏ,ʹÓÃ×Öµä»á¸ü¼Ó¿ì½Ý)
9.whileÓï¾ä°üº¬Ò»¸öelseµÄ´Ó¾ä.
10.rangeÏòÉÏÑÓÉìµ½µÚ¶þ¸öÊý,¼´Ëü²»°üº¬µÚ¶þ¸öÊý.
11.ʹÓÃglobalÓï¾ä¿ÉÒÔÇå³þµØ±íÃ÷±äÁ¿ÊÇÔÚÍâÃæµÄ¿é¶¨ÒåµÄ.
Ïà¹ØÎĵµ£º
¹«Ë¾µÄ´úÀí¿ÉÒÔÖ±½Ó´©Ç½£¬×ÔÓÉ·ÃÎÊTwitter¡¢FacebookµÈÍøÕ¾£¬ÕâÁ½ÌìÑо¿ÁËÒ»ÏÂTwitterÌṩµÄAPI£¬ÓÃpythonдÁËÒ»¸ötwitter client£¬Ö»ÊµÏÖÁË»ù±¾¹¦ÄÜ£¬²é¿´×Ô¼ºµÄtwitterÏûÏ¢£¬Ò²¿ÉÒÔ²»ÑéÖ¤£¬²é¿´publicµÄtwitterÏûÏ¢¡£ÆäËû¹¦ÄÜʵÏÖÀàËÆ¡£Ö÷Òªº¯ÊýÈçÏ£º
def fetch_with_proxy(proxy, username, password, url):
&n ......
while µÄÓ÷¨£º
while ºóÃæ¸úÌõ¼þ±í´ïʽ£¬(:)ºóÃæ¸úÓï¾ä¿é£¬Äã¿ÉÒÔÔÚÕâ¶ÎÓï¾ä¿éÀïÐÞ¸ÄÌõ¼þ±í´ïʽµÄijЩ±äÁ¿£¬µ±Ìõ¼þ±í´ïʽ Ϊ¼ÙµÄʱºòÍ˳öÑ»·¡£ÀýÈ磺
flag = 5
while flag > 0:
#ÕâÀïÊÇÄãµÄ´úÂë
flag -= 1
#if flag == 3: break
#if flag == 3: continue
print flag
µ±È»ÄãÒ²¿ÉÒÔÔÚÊʵ ......
Python¿ìËÙÈëÃÅ
Ŀ¼
1. µÚÒ»Õ Python¿ìËÙÈëÃÅ
&nbs ......
½ñÌìѧϰÁËÒ»ÏÂPythonµÄ²Ù×÷·ûÖØÔØ£¬×ܽáÁ˼¸µã±È½ÏÉñÆæµÄ¶«¶«£º
------------------------------------------------------------------------------------------------------------
¹ØÓÚiter£º
Technically, iteration contexts work by calling the iter built-in function to try to
find an _ _iter_ _ method, whi ......