import random
def name(params):
    G = [
    [1,3,5,7],
    [2,4,6,8],
    [0,4,5,8],
    [2,1,6,7],
    [3,0,5,8],
    [1,3,6,7],
    [0,2,4,8],
    [2,6,5,1],
    [0,3,4,7],
]

    H=G[params]
    print(params)
    while (params in H) != True:
        Q = random.randint(0,len(H)-1)
        print(H[Q])
        H=G[H[Q]]
    print(H)
name(0)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: