I have to replace the north, south, etc with N S in address fields.
If I have
list = {'NORTH':'N','SOUTH':'S','EAST':'E','WEST':'W'}
address = "123 north anywhere street"
Can I for iterate over my dictionary values to replace my address field?
for dir in list[]:
address.upper().replace(key,value)
I know i'm not even close!! But any input would be appreciated if you can use dictionary values like this.
See Question&Answers more detail:os