x = "haaiiillll"
y=list(x)
z=[]
a=len(y)
n=0
for i in y:
print(y[n:])
if i != y[n:]:
z.append(i)
n+=1
print(z)
How do I implement this, I can't understand. I have tried to implement a program where it checks if the value with i
is there anywhere in the list y
if not it will add it otherwise it shouldn't.