Having visited both cities a few times I find more of interest to discover and explore in Melbourne than Sydney. So I would go with Melbourne, maybe even more days than Sydney. But you can't go wrong really.
There are out-of-city options of course like Philip island outside Melbourne and the Blue Mountains outside Sydney, if either of those interest you it might influence your decision. But if you are staying in the city I definitely say Melbourne. For what you say you like doing (walking about town and exploring) Melbourne is among the best cities for that.