How to deal with exception handling in python? Lets say I have a variable city which accepts any city name , like
city='London' 

or
city='New York'

It accepts only city name but if user mistakenly specifies city name some different like
city='Londo'

How does should I deal with it means I want to use try catch in it , But How ?
In an interactive program,
If no matching city name found
then shows the input value again and ask the user to enter another value

In data preparation,
select unmatching city names 
and find patterns of mistakes
use regular expression accordingly to replace the mismatching city names with the right ones
for example, new_df = df.replace(to_replace ='Londo.*', value = 'London', regex = True)

That is how I would do.