今天上午講了數據類型,老師帶着做了幾個小練習,感受對python忽然很着迷,我來學python徹底是想混個試聽的,感受喜歡上編程了,或許我在某一天也成爲編程牛人,期待...python
將今天學的東東,顯擺一下。linux
首先,怎麼安裝Python.編程
一個同窗幫我安裝了LINUX系統後,輸入一個'python',就進入了,顯示以下:ubuntu
<!-- lang: python --> Python培訓@智普教育$ python
Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.code
老師還推薦了使用ipython,怎麼安裝? 在linux下輸入ipython,系統提示 sudo apt-get install <??> 輸入 sudo apt-get install ipython 便可安裝,安裝後的界面orm
<!-- lang: python --> Python培訓@智普教育$ ipython
Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03) Type "copyright", "credits" or "license" for more information.ip
IPython 0.8.1 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more.get
In [1]:it
敲幾行代碼吧io
<!-- lang: python -->
In [7]: a=1
In [8]: a Out[8]: 1
In [9]: a='hello'
In [10]: a Out[10]: 'hello'
分享幾個快捷鍵: ctrl+alt+T 打開終端 ctrl+z 中斷 ctrl+d 退出