字典:dict = {“key1”:“value1”,“key2”:“value2”}
for key, value in dict.items():遍歷字典所有鍵-值對
for key in dict.keys():遍歷字典中的所有鍵
for value in dict.values():遍歷字典中所有值
字典:dict = {“key1”:“value1”,“key2”:“value2”}
for key, value in dict.items():遍歷字典所有鍵-值對
for key in dict.keys():遍歷字典中的所有鍵
for value in dict.values():遍歷字典中所有值