python program to sort elements of a list using selection sort code example
Example: selection sort python
def selection(s):
for i in range(0,len(s)-1):
p=0
mini=s[-1]
for j in range(i,len(s)):
if s[j]<=mini:
mini=s[j]
p=j
s[i],s[p]=s[p],s[i]
print(s)
selection([2,3,4,2,1,1,1,2])