python_for_asl/Exercise/exercise-2.3.py
2025-08-06 02:04:35 +08:00

19 lines
323 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

age_dict = {
"Zhang San": 52,
"Li Si": 19,
"Wang Wu": 47
}
# 检查后发现张三的年龄和李四的年龄写反了请将他们调整过来。并添加Zhao Liu年龄为29
# 应当为 19
print(age_dict['Zhang San'])
# 应当为 52
print(age_dict['Li Si'])
# 应当为 29
print(age_dict['Zhao Liu'])