If data is the variable having you city value and other info than to get only the city name
data.split("-")[1]
I have strings in the database that are the names of countries and cities for example like this:
Italy-Milan OR France-Paris.
How can i select only the city part, like select what comes only after the '-' using python?
how to select a specific part of a string Django?