I fully agree with with wideman. Both cities are nice although if you travel by train, Lugano might be more convenient, coggle wheel car between the station and the center. Another little train will bring you to Monte Brè, the sugar loaf of Lugano. Almost across from the Cartier shop there is a fabulous little café that serves some of the nicest pastries ever.
The big advantage, there are either direct buses to Malpensa Airport or almost every hour a train to Milan.