I've heard Cape Town is very dangerous... is it?
Opportunistic crime does exist, but provided you use the same kind of street smarts you would use in most big cities and don't do things like walk alone in unfamiliar areas after dark, don't make yourself an easy target and don't be oblivious to your surroundings, you should be able to avoid being the victim of opportunistic criminals.