class A:
    def __init__(self, x):
        self.x = x

    def BS(self):
        for j in range(10):
            for i in range(len(self.x) - 1):
                if self.x[i] > self.x[i+1]:
                    th = self.x[i]
                    self.x[i] = self.x[i+1]
                    self.x[i+1] = th
        return self.x

a = A([1, 3, 2])
print(a.BS())

Embed on website

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