I would like to place 'y' value at the end of the set {'e', 'y', 'u'}.
I have tried to remove the value and then add it again at the end:
last_vowels = 'y'
vowels = {'e', 'y', 'u'}
vowels.remove(last_vowels)
vowels.add(last_vowels)
print(vowels)
I've also tried to convert it into the list and then append 'y' it at the end, and convert it back to "set" type.
vowels.remove(last_vowels)
vowels_list = list(vowels)
vowels_list.append(last_vowels)
vowels = set(vowels_list)
print(vowels)
From what I read the "set" type doesn't have indexing.
So I'm wondering if there is a way to rearrange the 'set'?