Good debate. My instincts are with SGB and MP - and also Stayfrosty, who's still walking after dark when she feels confident enough, which is great.
I always used to walk home, mostly alone, often pretty late/early, often after drinking (found it a great way to sober up a bit before bed). For a time my route home went through a red light district, and I actually found that reassuring - there were other people around, and one of the thoughts in my head was 'if it's on sale people are less likely to steal it'.
I always made a point of walking confidently - shoulders back, steady gait - and if I didn't know who's footsteps were behind me I'd turn and look or cross the road and see if they followed.
I was followed a couple of time in my youth - lcukily I knew the area better and ducked them. Didn't stop me.
The only thing that stops me now is not having any money to go anywhere
There are basic precautions you can take - keeping flashy jewellery under wraps, wearing your handbag under your coat etc, which make you less of a target. But you can do everything right and be attacked, you can get everything wrong and not be attacked, and the first is still less likely than the second IMO.