#4z: Coding in Python {Sorter}
116 times better than this garbage .
- n = int(input('No of terms: '))
- itema = []
- for i in range(n):
- t = int(input("Enter numbers: "))
- itema.append(t)
- def ran(di):
- global want
- low = di[0]
- for i in (di):
- if i<low:low=i
- return low
- test1 = []
- for i in range (n):
- test1.append(ran(itema))
- itema.remove(ran(itema))
- print(test1)
- test1.reverse()
- print(test1)
I would like to thank Mr. Abdul Rahmani for suggesting major changes.
Download the above code from here.
Comments