defcmp_die(die1,die2):'compares two die returning <, > or ='# Numbers of times one die wins against the other for all combinationswin1=sum(d1>d2ford1,d2inproduct(die1,die2))win2=sum(d2>d1ford1,d2inproduct(die1,die2))return'>'ifwin1>win2else('<'ifwin1<win2else'=')