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

beginning python summary chapter 2 ÁбíºÍÔª×é

1¡¢ÔÚPythonÖÐ×î»ù±¾µÄÊý¾Ý½á¹¹ÊÇÐòÁУ¨sequence£©£¬ÐòÁÐÖеÄÿ¸öÔªËر»·ÖÅäÒ»¸öÊý×Ö——ÔªËصÄλÖã¬Ò²½ÐË÷Òý¡£µÚÒ»¸öË÷ÒýÊÇ    0£¬µÚ¶þ¸öË÷ÒýÊÇ1£¬Èç´ËµÝÍÆ¡£ÐòÁÐÖеÄ×îºóÒ»¸öÌõÄ¿±»±ê¼ÇΪ-1£¬µ¹ÊýµÚ¶þÊÇ-2£¬Èç´ËµÝÍÆ¡£
2¡¢ÐòÁУºeg:edward = ['Edward Gumby', 42]£¬ÐòÁÐÒ²ÄÜ°üº¬ÆäËûµÄÐòÁС£ÐòÁеķÃÎÊ£ºedward[0],edward[-1]...×Ö·û´®Äܹ»Ö±½ÓʹÓÃË÷Òý£¬¶ø²»ÐèÒªÒ»¸ö±äÁ¿ÒýÓÃËüÃÇ:'Hello'[1]¡£Èç¹ûÒ»¸öº¯Êýµ÷Ó÷µ»ØÒ»¸öÐòÁУ¬ÄãÄܶÔËüʹÓÃË÷Òý£ºfourth = raw_input('Year: ')[3] ¡£
3¡¢ÇÐƬ£ºÓÃÇÐƬÀ´·ÃÎÊÒ»¶¨·¶Î§µÄÔªËØ¡£tag = '<a href="http://www. pythonorg">Python web site</a>'£¬eg: tag[9:30],tag[32,-4]£¬µÚÒ»¸öË÷ÒýºÅÊÇÄãÒªÌáÈ¡µÄÔªËØÖеĵÚÒ»¸öÔªËصıàºÅ¡£
      Èç¹ûÇÐƬÖÐ×ó±ßµÄË÷ÒýºÅÈç¹û±ÈÓұߵĿ¿ºó£¬ÄÇô½á¹û¾ÍÊÇÒ»¸ö¿ÕµÄÐòÁС£eg: numbers[-3:0]   []
      ¼¼ÇÉ£ºÈç¹ûÇÐƬ³ÖÐøµ½ÐòÁеĽá⣬Äã¿ÉÒÔ¼òµ¥µÄÖÿպóÒ»¸öË÷ÒýºÅ.eg:numbers[-3:]¡£Èç¹ûÇÐƬ´Ó¿ªÍ·¿ªÊ¼£¬¿ÉÒÔÖÿյÚÒ»¸öË÷Òý  ºÅ¡£eg:numbers[:3]¡£Èç¹ûÄ㸴ÖÆÕû¸öÐòÁУ¬Äã¿ÉÒÔÖÿÕÁ½¸öË÷ÒýºÅ¡£eg:numbers[:]¡£
      ΪÇÐƬÉèÖò½³¤£¬eg:numbers[0:10:2]£¬²½³¤²»ÄÜΪ0£¬µ«¿ÉÒÔΪ¸ºÊý£¬Õâ¾ÍÒâζ×Å´ÓÓÒµ½×óÌáÈ¡ÔªËØ¡£eg:number[::-2]¡£


Ïà¹ØÎĵµ£º

Python or Ruby

http://blog.csdn.net/myan/archive/2008/01/07/2028545.aspx
http://blog.csdn.net/gashero/archive/2007/06/03/1636030.aspx
 
ÎҸоõ»¹ÊÇpythonÓ¦Óøü¹ãһЩ£¬RubyµÄRoR×öWeb¿ò¼ÜºÃһЩ°É£¬ÖÁÓÚperl£¬ÏÖÔڸоõʵÔÚÓм¸·Ö¿àɬ…… ......

ʹÓÃpython 3.0 ´¦Àíutf8¸ñʽµÄÎļþBOMÎÊÌâ

×î½üÏÂÔØÁËÒ»·Ý×îеÄpython3.0Íæ¶ù
ûÏëµ½print(Hello world)¾ÍÄÑΪÁËÎÒ°ëÌì
ÎÊÌâ1£¬printº¯Êý
ºóÀ´¿´ÁËһϸüеÄÎĵµ²ÅÖªµÀ£¬3.0ÒÔºóprintÒѾ­±»·â×°³Éº¯ÊýÁË
¶øÎÒ»¹Ò»Ö±Ï°¹ß2.6µÄ print 'Hello World'ÐÎʽ£¬ º¹Ò»¸ö£¡
ÎÊÌâ2£¬notepadµÄutf8¸ñʽ
ÎÒʹÓÃnotepadдÁ˸ö²âÊÔÎļþ£¬±£´æΪutf8¸ñʽ
¸ñʽ´ó¸ÅÊÇ:
test& ......

¡¾zz¡¿Python³£ÓÃ×ÊÔ´ÍøÖ·

zz from ¡¶¿É°®µÄPython¡·
http://www.woodpecker.org.cn/
Python±ê×¼¿â http://www.woodpecker.org.cn:9081/doc/Python/_html/PythonStandardLib/
¼òÃ÷Python½Ì³Ì http://www.woodpecker.org.cn:9081/doc/abyteofpython_cn/chinese/index.html
Python¿ìËÙ½éÉÜ http://www.zoomquiet.org/share/s5/intropy/070322-intro ......

pythonʵÏÖtwitter client

¹«Ë¾µÄ´úÀí¿ÉÒÔÖ±½Ó´©Ç½£¬×ÔÓÉ·ÃÎÊTwitter¡¢FacebookµÈÍøÕ¾£¬ÕâÁ½ÌìÑо¿ÁËÒ»ÏÂTwitterÌṩµÄAPI£¬ÓÃpythonдÁËÒ»¸ötwitter client£¬Ö»ÊµÏÖÁË»ù±¾¹¦ÄÜ£¬²é¿´×Ô¼ºµÄtwitterÏûÏ¢£¬Ò²¿ÉÒÔ²»ÑéÖ¤£¬²é¿´publicµÄtwitterÏûÏ¢¡£ÆäËû¹¦ÄÜʵÏÖÀàËÆ¡£Ö÷Òªº¯ÊýÈçÏ£º
def fetch_with_proxy(proxy, username, password, url):
 &n ......

pythonÖÐÀàµÄÊôÐÔ

pythonÖÐÀàµÄÊôÐÔ
pythonÖеÄÀà½Ðclass object,ÀàµÄʵÀý½Ðinstance object.
Àà Class Objects
ÀàÓµÓÐÁ½ÖÖ²Ù×÷,1.ÀàÊôÐÔ attribute references 2.ʵÀý»¯instantiation
1.ÀàÊôÐÔ¾ÍÏ൱ÓÚרÊôÓÚÒ»¸öÀàµÄ±äÁ¿(¼´Ä³Ð©ÓïÑÔÖеÄÀàµÄ¾²Ì¬¹«¹²±äÁ¿static public),ʹÓ÷½·¨ÊÇ:ÀàÃû³Æ.ÀàÊôÐÔÃû³Æ
2.ʵÀý»¯ÔòÊÇ´´½¨Ò»¸öÀàµÄʵÀýµÄ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ