variable+assignment+operator(變數+賦值+運算值) << Previous Next >> 二.賦值
一.變數
- 變數在python中代表了物件就像在生活中的物品一樣而此物件會藉由一種總稱來代表,例如:學生之學號 .身分證字號。而在python中則用以下例句來表示:變數 = 123 print(變數) 則出來之結果為123。
關鍵字在python中為代表了其特殊意義之字樣。例如:true false none def for 等都是常見的字元。
- 紅色字體代表常數
- 橘黃色字體代表型態定義
- 黑色字體代表控制陳述
- 藍色字體代表運算子
- 綠色字體代表模組相關
False |
assert |
del |
for |
in |
or |
while |
none |
break |
elif |
from |
is |
pass |
with |
true |
class |
else |
global |
lambda |
raise |
yield |
and |
continue |
except |
if |
nonlocal |
return |
|
as |
def |
finally |
import |
not |
try |
|
variable+assignment+operator(變數+賦值+運算值) << Previous Next >> 二.賦值