t = [1,2,1,3,2,3,1]
for _ in range(len(t)):
    for p in range(len(t)-1):
        if t[p] > t[p+1]:
            t[p],t[p+1] = t[p+1],t[p]

print(t)
        

Embed on website

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