'Find the list indices of all occurrences of a substring within the list [duplicate]

I'm using Python 3.10. I have an incredibly large list. Each item in the list is 26 character string. Somewhere within this vast list is a name. I would like to return the list indices of all occurrences of this name, which is a substring within a string.

It's a simple list called alphabet, with just one entry at each index. Every entry is a string and what I'm looking for is a string. Everything is in uppercase and no special characters are involved.

I've looked at several things but I'm only able to find results for returning substrings within strings. It's the fact that it's in a list that is stumping me...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source