I convert string a
to a list and I want the loop to create tabb = ['a', 'b', 'c', 'a']
a = aaabbbbcccaaa
taba = list(a)
tabb = []
for i in taba:
for j in range(len(tabb)):
if not i[j] == i[j-1]:
tabb.append(i[j])
print (tabb)
But apparently my solution gives tabb = []
Do You have any better and simple ideas to make it work?