8-2 增加及刪除字典內容
1. 增加字典內容
#建立一個空字典物件
highScore = {}
#逐一加入字典內容
highScore['會計']=6
highScore['國文']=3
highScore['英文']=5
highScore['程式']=8
#印出字典
print(highScore){'會計': 6, '國文': 3, '英文': 5, '程式': 8}
2. max()

自主練習
Last updated
#建立一個空字典物件
highScore = {}
#逐一加入字典內容
highScore['會計']=6
highScore['國文']=3
highScore['英文']=5
highScore['程式']=8
#印出字典
print(highScore){'會計': 6, '國文': 3, '英文': 5, '程式': 8}

Last updated
a = {5, 13, 14, 6, 7, 13} #建立一個集合物件
print(max(a)) #找最大值14