There are a lot of methods available online for doing this, what I am trying to do is just slicing the string and concatenating it leaving the duplicate character. It just fails to run for some cases, for e.g if there is more than one duplicate it just fails to delete it. I can't understand how to make my inner loop run again for the same index to check for other duplicates. I know that this is not the best solution but I just wanna know whether we can make this logic work or not.
s = input()
l = len(s)
for i in range(0, l-1):
for j in range(i+1, l - 1):
if s[i] == s[j]:
s = s[:j] + s[j+1:]
print(s)
sample input: helllo
output: hello
expected output: helo