cara mendapatkan semua indeks arang string di python
word = 'Hello'
to_find = 'l'
# in one line
print([i for i, x in enumerate(word) if x == to_find])
Darkstar
word = 'Hello'
to_find = 'l'
# in one line
print([i for i, x in enumerate(word) if x == to_find])