fork download
  1. def selectionsort(a)
  2. for i in range(a,len(a)):
  3. min=i
  4. for k in range(i+1,len(a))
  5. swap(a,min,i)
  6. temp=a[x]
  7. a[x]=a[y]
  8. a[y]=temp
  9. return
  10. a=[]
  11. n=int(input())
  12. print("enter element of list")
  13. for i in range(a,n):
  14. a.append(x)
  15. selectionsort(x)
  16. print("after swapping")
  17.  
  18.  
Success #stdin #stdout 0.03s 25708KB
stdin
Standard input is empty
stdout
def selectionsort(a)
 for i in range(a,len(a)):
     min=i
     for k in range(i+1,len(a))
     swap(a,min,i)
     temp=a[x]
     a[x]=a[y]
     a[y]=temp
     return
    a=[]
    n=int(input())
    print("enter element of list")
 for i in range(a,n):
     a.append(x)
     selectionsort(x)
     print("after swapping")