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

pythonÔõôprint 'hello world'

´ó¼ÒºÃ£¬ÎÒÊÇÒ»¸öÐÂÊÖ£¬¸Õ¿ªÊ¼Ñ§python£¬µ«ÊǸտªÊ¼µÄhelloworld¶¼Ã»·¨´òÓ¡£¬ÈÃÎÒºÜÎÞÄΡ£
ÎÒµÄpython°²×°Â·¾¶Îªf:\python31¡£ÔÚpathÖÐÒ²ÉèÖöÔÁË£¬ÔÚwindowsÏÂÔËÐÐÊÇÕâÑùÏÔʾµÄ£¬Ï£Íû¸÷λǰ±²Ö¸µãһϡ£Ð»Ð»
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print 'hello world!'
SyntaxError: invalid syntax (<pyshell#0>, line 1)
>>>
python 3.x
print ('hello world!')


python 2.x
print 'hello world!'


·Ç³£¸Ðл

ºÇºÇ

ÓùýPython 2.5x µÄ»¹ÕæÊDz»Ï°¹ß3.x°¡£¬ºÇºÇ£¬print»¹Òª¼ÓÀ¨»¡Ì«Âé·³ÁË£¡

ÎÒÒ²¾õµÃºÜÂé·³

»¹ÊÇҪѧ3.x°¢£¬¸Ð¾õ¹ýЩÈÕ×Ó¾ÍÈ«3.xÁË

»¹ÊǾõµÃÔ­À´µÄºÃµã

ºÜºÃÆ棬Python 3.XÕâ¸ö¸Ä¶¯µÄÔ­Òò¡£Ã»ÓÐ×öµ½ÏòÇ°¼æÈÝ°¡¡£
ÄѵÀÓÐʲôÄÚÄ»£¿:)

ÒýÓÃ
ºÜºÃÆ棬Python 3.XÕâ¸ö¸Ä¶¯µÄÔ­Òò¡£Ã»ÓÐ×öµ½ÏòÇ°¼æÈÝ°¡¡£
ÄѵÀÓÐʲôÄÚÄ»£¿:)

ûÓùý3.x
²»ÖªµÀ del object »á²»»á»»³É del(object)

ÒýÓÃ
ÒýÓà 8 Â¥ xxzh_ustc µÄ»Ø¸´:
ºÜºÃÆ棬Python 3.XÕâ¸ö¸Ä¶¯µÄÔ­Òò¡£Ã»ÓÐ×öµ½ÏòÇ°¼æÈÝ°¡¡£
ÄѵÀÓÐʲôÄÚÄ»£¿:)

ûÓùý3.x
²»ÖªµÀ del object »á²»»á»»³É del(object)


¶¼ÐÐ

>>> i=3
>>> del(i)
>>> i1=4
>>> del i1
>>>
{{----


Ïà¹ØÎÊ´ð£º

Python + Tkinter ´°¿ÚËõ·ÅÎÊÌâ

ѧϰÓÃpython+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·­Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌرðÖ¸¶¨³ß´ç£¬°´Ï·­Ò³°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......

python½Ì³ÌÖÐʹÓÃÔ´ÎļþµÄÎÊÌâ~~

ʹÓÃÔ´Îļþ

#!/usr/bin/python
# Filename : helloworld.py
print 'Hello World'

ÎÒÔõôҲ¿´²»¶®£¡Ö»ÊÇ×îºóÒ»ÐÐÎÒÖªµÀ~~Ç°ÃæÁ½ÐÐÊÇʲôÒâ˼ÄØ£¿
½Ì³ÌÉÏ˵Èç¹ûÄãʹÓÃIDLE£¬ÇëʹÓò˵ ......

³õѧPYTHON£¬´ó¼ÒÖ÷ÒªÓÃËüÀ´×öʲô

    ¸Õ½Ó´¥£¬¸Ð¾õ¹¦ÄܱȽÏÇ¿´ó£¬Ö÷ÒªÊÇÕ³ºÏÐԺ㬿ÉÒÔÓлú½áºÏÆäËûÓïÑÔ¡£µ«²»Ã÷°×ËüÖ÷ÒªÓ¦ÓÃÓÚʲôÁìÓò£¬Ö÷Òª×öÄÇ·½ÃæµÄ¶«¶«¡£¿ª·¢ERPϵͳÊÇ·ñ¿ÉÐУ¿
»ù±¾ÉÏʲô¶¼¿ÉÒÔ×ö

½ñÌìÈ¥¿´ÁËһϣ¬»ù±¾ÉÏʲô ......

python PILÄ£¿é´ò¿ªÍ¼Æ¬ÎÊÌâ

ÇëÎÊÏ£¬ÎÒµÄÊÇpython2.5°²×°ÁËPILÄ£¿é£¬È»ºó±àд³ÌÐò´ò¿ª±¾»úÉϵÄÒ»¸öͼƬʱ£¬ÎªÊ²Ã´ÀϳöÏÖ´íÎóÄØ£¬ÀÏÊÇÕÒ²»µ½Í¼Æ¬£¬´íÎóÌáʾÈçÏ£ºFile "C:\Python25\Lib\site-packages\PIL\Image.py", line 1888, in o ......

pythonÕýÔò±í´ïʽ ÈçºÎÈ¡³öÒÔÏÂ×Ö·û´® ¶àл

s='aaa111aaa,bbb222,333ccc,444ddd444,555eee666,fff777ggg'
ÓÃÕýÔò±í´ïʽȡ³ö Ç°ºó×ÖĸÏàͬµÄÊý¾Ý ½á¹ûÈçÏÂ:
111 ddd
лл~
Python code:

import re
s='aaa111aaa,bbb222,333ccc,444ddd444,555eee666,ff ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ