The string is:
x = 'ABBA'
whenever I use this code:
x = 'ABBA' x = ''.join(set(x)) print(x)
It results in:
BA
but I want it to be the first letters instead of the second letters:
AB
Is there any way that I can do it without using reverse function?