Here is what I've learned:
"I like living in a city." This sounds like it doesn't matter which city I live in -- any one will do.
"I like living in the city." This is a more common thing to say. People say "the city" to mean not "the country". These are two set phrases, representing two concepts/lifestyles. (Of course, if there is a context, "the city" can mean a particular city.)
Group A(more common): I like living in the city. Transportation is easier in the city. Life in the city is convenient. In the city things change all the time.
Group B: I like living in a city. Transportation is easier in a city. Life in a city is convenient. In a city things change all the time.
Is it always better to use Group A? Can you provide a context where it is better to use Group B?