if randomValue <= sum(i.freq for i in diceList[0:i + 1]):
    print('O', i, 'randomValue', randomValue, 'prob container', sum(i.freq for
        i in diceList[0:i + 1]))
Python: "breaking out" of if statement inside a for loop