做出決策
字符串lower()方法與upper()方法,實(shí)現(xiàn)大小寫之間的轉(zhuǎn)換。
判斷:if 條件 :
? ? ? ? ? ? ? ? ?縮進(jìn)
循環(huán):while循環(huán)方法

for in range方法:

關(guān)于這里的else:僅當(dāng)循環(huán)語(yǔ)句中的break不被執(zhí)行時(shí),才會(huì)執(zhí)行本循環(huán)的else。

try ? except ?異常處理:

fridge_contents={"egg":8,"mushroom":3,"cheese":2,"tomato":4,"milk":13}
try:
if fridge_contents["bitch"]>100:
print("let's eat eggs!")
except (KeyError,TypeError) as error:
print("fuck you! %s is not enough"%error) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??