字典的使用
phone = input("请输入电话...")
mapping = {
"1": "one",
"2": "two",
"3": "three",
"4": "four",
"5": "five",
"6": "six",
"7": "seven"
}
output = ""
for ch in phone:
output += mapping.get(ch, ch) + " "
print(output)

字典的使用
phone = input("请输入电话...")
mapping = {
"1": "one",
"2": "two",
"3": "three",
"4": "four",
"5": "five",
"6": "six",
"7": "seven"
}
output = ""
for ch in phone:
output += mapping.get(ch, ch) + " "
print(output)