• + 0 comments

    can someone say what is wrong in this:

    # Enter your code here. Read input from STDIN. Print output to STDOUT
    from fractions import Fraction
    
    table=['r','r']+['b' for i in range(8)]
    table2 = list(table)
    print(table)
    
    count=0
    total=0
    
    for i in table:
        table2 = list(table)    
        table2.remove(i)
        for j in table2:
            table3 = list(table)    
            table3.remove(i)
            table3.remove(j)
            for k in table3:
                draw=i+j+k
                #print(draw)
                if any([m in draw for m in ['rrb','brr']]):
                    print(draw,[m in draw for m in ['rrb','brr']])
                    count+=1
                total+=1
                
    print(Fraction(count, total))