It looks same algorithm but different output : The code looks same algorithm but different output.


When you uncomment
```
#k = data.index(mn)
#data[i], data[k] = data[k], data[I]
```
and also comment out
```
data[i], data[data.index(mn)] = data[data.index(mn)], data[i]
```
the data will be successfully sorted.

I cannot figure out the difference of two way.


```
data = [-1.48,  4.96,  7.84, -4.27,  0.83,  0.31, -0.18,  3.57,  1.48,  5.34,
         9.12,  7.98, -0.75,  2.22, -1.16,  6.53, -5.38,  1.63, -2.85,  7.89,
        -5.96, -8.23,  8.76, -2.97,  4.57,  5.21,  9.43,  3.12,  6.52,  1.58 ]
#sort2

for i in range(30):
    mn = data[i]
    for j in data[i:]:
        if j < mn:
            mn = j
        else:
            pass
    #k = data.index(mn)
    #data[i], data[k] = data[k], data[i]
    data[i], data[data.index(mn)] = data[data.index(mn)], data[i]
print('ascending order2:')
print(data)
```