Pretend you don't hear. There were many other women I met along the way who were also traveling alone. It was great to team up for a day or two. Men all over the world can be dirty or dangerous. Be careful but don't take it personally.
European men are very touchy and aggressive.
Act inconspicuous to be hassled less. I wouldn't recommend women traveling alone in Morocco or Turkey. I'm very proud to say that I traveled alone. I only had one negative experience where a drunken Englishman got touchy-feely on a train. Walk away when approached by strange men.