Python risk analysis