Breakout in python