Django Python實戰(一)

這段日子決定學習python,開發一個運維繫統,全部記錄本身寫下的點點滴滴python

直接開始,不說廢話了運維

好的開發首先須要一個好的開發平臺,首先須要安裝eclipse+python插件eclipse

 

1 python基礎ide

主要說到python的基本幾個方面:註釋,變量,運算符,和基本python類型學習

 

 

註釋this

python的註釋是用#表示,若是它是在一行裏的第一個字符,那麼整行就都是註釋插件

                                   #還能夠在行的中間,這表明從#開始的地方起同行中剩下的部分都屬於註釋ip

# this entire lines ls a comment
foo = 1     #short comment :assign int 1 to foo
print 'python and %s are number %d' % ('Django',foo)開發

運行結果爲it

python and Django are number 1

 

 

變量和賦值

>>> foo = 'bar'
>>> foo
'bar'
>>> foo = 1
>>> foo
1

 

 

運算符

包括算術運算符如 + – *

相關文章
相關標籤/搜索