+ 6
How red came at last?
items = 'red, white, black, red, green, black' words = [word for word in items.split(',')] print(','.join(sorted(list(set(words)))))
3 odpowiedzi
+ 5
Oh thanks.
+ 3
Because some colors got " " (space) with them, it affected about how they got sorted and how set removed "duplicates".
0
c ta mere qui saigne