G = [1,1,4,5,1,4]
for _ in range(len(G)):
    for S in range(len(G)-1):
        if G[S] > G[S+1]:
            G[S],G[S+1] = G[S+1],G[S]
        
print(G)

Embed on website

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