I agree. It is best to stay away from situations that are potentially dangerous.
Such as?
* Being alone in a car in an isolated spot, your home, etc.
* Feeding sinful sexual feelings by watching porn or staring too long at a provocative photo (all men momentarily get locked on to such a picture, but you don't make that second, and deliberate, look).
* It also helps to be with a woman who likewise does not want to sin.
All of this still may not prevent fornicating. But, it sure takes away some tools from the enemy.