自學Python之路html
變量是容器python
存儲數據到內存app
存儲數據方便後面引用spa
[‘and’, ‘as’, ‘assert’, ‘break’, ‘class’, ‘continue’, ‘def’, ‘del’, ‘elif’, ‘else’, ‘except’, ‘exec’, ‘finally’, ‘for’, ‘from’, ‘global’, ‘if’, ‘import’, ‘in’, ‘is’, ‘lambda’, ‘not’, ‘or’, ‘pass’, ‘print’, ‘raise’, ‘return’, ‘try’, ‘while’, ‘with’, ‘yield’]code
舉例1: NumsOfCarlosGf = 19 駝峯寫法,首字母大寫htm
舉例2:USER_NAME = 'Carlos' 定義一個常亮blog
舉例3:user_name = 'Carlos' 每一個單詞中間用下劃線鏈接,python官方推薦內存
name = 'Carlos' # 變量名是name,值是Carlos開發
1 applePrice = 3.5 # 蘋果的價格 元/斤 2 weight = 7.5 #蘋果的重量斤 3 4 money = applePrice * weight # 若是第一次出現的話,那麼表示定義了一個變量 5 money = money - 10 # 若是不是第一次出現的話,那麼就不是定義變量,而是給這個已經存在的變量賦值
........................get