• + 0 comments

    Python 3

    dice=[1,2,3,4,5,6]
    comb=[(a,b) for a in dice for b in dice]       
    favourable=[(a+b)==6 for a,b in comb if a!=b]       
    
    sum(favourable)/len(comb)