python3 return a list of indexes of a specific character in a string

string='mississippi'
s='s'
lst= []
for i in range(len(string)):
    if (string[i] == s):
        lst.append(i)
print(lst)
#result: [2, 3, 5, 6]

Here is what the above code is Doing:
1. We create an empty list called lst.
2. We loop through the string.
3. If the character in the string is equal to the letter s, we append the index of that character to the list.
4. We print the list.