📅  最后修改于: 2022-03-11 14:46:55.347000             🧑  作者: Mango
address = "123 north anywhere street"
for word, initial in {"NORTH":"N", "SOUTH":"S" }.items():
address = address.replace(word.lower(), initial)
print address