ÎÒÓ¦¸ÃÑ¡Ôñperl»¹ÊÇpython»¹ÊÇÆäËû°¡ лл
ÎÒµÄÑо¿·½ÏòÊÇÖÐÎÄÐÅÏ¢´¦ÀíÖеÄÎı¾·ÖÀàÏà¹ØµÄ¶«¶«
ÔÙ¾ßÌåÒ»µã¾ÍÊÇÎı¾ÇãÏòÐÔ£¬Çé¸Ð·ÖÀàÖ®ÀàµÄ¶«¶«¡£¡£¡£¡£
ÏëѧһÃŽű¾ÓïÑÔÀ´±à³Ì¡£¡£¡£
Ï£Íû´ó¼Ò°ïæÍƼöһϰ¡ лл
Õâ¶ÔÎÒÀ´ËµºÜÖØÒªµÄ
Ó¦¸Ã¶¼ÐУ¬ÎÞËùν£¡¿´ÄãÈÏΪÄĸö¼òµ¥£¡
Ó¦¸Ã¶¼¿ÉÒÔµÄ,¿´×Ô¼º~~
¸öÈËÍƼöPython£¬Ã»±ðµÄ£¬¼òµ¥ÊµÓá£
ϲ»¶¼ò½àÑ¡Perl
ϲ»¶¹æ·¶Ñ¡Python
×Ô¼º¶¥
Á½¸ö¶¼²»´í
ÓÃlinux¾Íperl²»ÓþͶ¼ÐС£
Äã¿´¿´perl µÄ¼ªÏéÎï¾ÍÖªµÀ£¬perlÊÇÎÞ±ÈÇ¿´óµÄ¡£
http://www.china-pub.com/209139
http://www.china-pub.com/48392
¶¥ÉÏÈ¥
¿ÉÒÔ¶¼Ñ§Ò»Ñ§£¬È»ºó£¬Äã¾ÍÖªµÀ×Ô¼ºÏ²»¶ÄÄÒ»¸ö¡£Ñ§Ï°Õ߶«Î÷£¬²»Å¶ࡣ
ruby
python
µ±È»ÊÇPERL
ÓÈÆäÊÇÎı¾´¦Àí
Îı¾´¦Àíµ±È»ÊÇPerl
ºÎÒÔ½âÓÇ£¬Î¨ÓÐpython
Äãµ½µ×ÍƼöÄĸöѽ^_^
ÓÃpython°É£¬Äã»áϲ»¶µÄ
ÍƼöpython£¬¼ò½à¡¢´¦ÀíÎı¾µÄ¹¦ÄÜÇ¿´ó¾ù²»ÑÇÓÚperl£¬¶øÇÒÖ§³ÖOO£¬ÓÐÀûÓÚ´óÐÍÈÎÎñ
ÓÃpython°É£¬Ñ§ºÃÁËÄÜ×öºÜ¶àÊÂ
perlʵÔÚÊÇÌ«¹îÒìÁË
Perl£¬Ö»ÓÐPerl²ÅÊÇ´¦ÀíÎı¾µÄÀûÆ÷£¬ºÇºÇ¡£
Õâ¸ö¾Í¿´Äã,¾«Í¨Ò»ÃÅ,ÆäËü¶¼ÊÇ´¥ÀàÅÔͨµÄ.
¿ÉÒÔÏÈdz³¢éüÖ¹£¬µ÷³öϲ»¶µÄºóÉîÈë½ø¹¥
perl,python,shell,lua,ÉõÖÁphp(cmd line·½Ê½µÄ)¶¼¿ÉÒÔÁË
ÎÒµÄ×ÊÔ´ÖÐÓм¸¸öÀý×Ó
Ïà¹ØÎÊ´ð£º
×î½üÓÃpythonдһ¸ö³ÌÐò,×ÜÊÇÒì³£Í˳ö£¬µ«ÊÇȴû·¨ÓÃtry..exceptÀ´²¶×½
ÓÉÓÚû·¨·¢Í¼Æ¬£¬ËùÒÔ°ÑÏà¹ØµÄÐÅÏ¢´òÓ¡³öÀ´
Òì³£µÄÐÅÏ¢´óÖÂÈçÏ£º
python.exeÓöµ½ÎÊÌâÐèÒª¹Ø±Õ¡£ÎÒÃǶԴËÒýÆðµÄ²»±ã±íʾ±§Ç¸ ......
ѧϰÓÃpython+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌرðÖ¸¶¨³ß´ç£¬°´Ï·ҳ°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......
Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:
>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......
´ó¼ÒºÃ£¬ÎÒÊÇÒ»¸öÐÂÊÖ£¬¸Õ¿ªÊ¼Ñ§python£¬µ«ÊǸտªÊ¼µÄhelloworld¶¼Ã»·¨´òÓ¡£¬ÈÃÎÒºÜÎÞÄΡ£
ÎÒµÄpython°²×°Â·¾¶Îªf:\python31¡£ÔÚpathÖÐÒ²ÉèÖöÔÁË£¬ÔÚwindowsÏÂÔËÐÐÊÇÕâÑùÏÔʾµÄ£¬Ï£Íû¸÷λǰ±²Ö¸µãһϡ£Ð»Ð»
Pyth ......
ÖÕÓÚÍêÁ˸ßһʱһ¸öССµÄÔ¸Íû£¬Ð´Ò»¸ö²ÂÊý×ÖµÄСÓÎÏ·£¡
Ï×ÉÏÔ´´úÂ룡
Python code:
#! /usr/bin/env python
# -*- coding:gb2312 -*-
import random
class game:
def __init__(self):
......