-1
I was given this list to sort without repeating numbers. What would be the best way to do?
lst = [54,54,93,93,77,77,44,44]
def bubbleSort(lst1):
for x in range(len(lst1)-2,0,-3):
for y in range(x):
if lst1[y]>lst1[y+1]:
temp = lst1[y]
lst1[y] = lst1[y + 1]
lst1[y+1] = temp
print(lst)
bubbleSort(lst)
print("Ordenado ....")
print(lst)
How so order without repeats ? Do you want to sort or do you want to remove the repeaters ? Or do both wing actions separately ?
– Isac