Solved by spanev in post #2 
              
              
                Hi @slavavs, 
Here you declare a list of length 7: 
    shuffle_list = list(range(1, b))

So in the inner loop you should iterate of range(b-1) and not range(b).