I want the find the index of the string that contains another string within a list of n items.
MyList = ['acdef','GFDGFDG gfdgfd', 'Blue234 Sky2bas', 'Superman.424', 'baseball']
MyString = 'ball'
I want to get 4, since 'baseball' contains 'ball'
When looking for the exact string, I could use something like
MyList.index(MyString)
but this won't work with the above scenario since 'ball' is only a portion of 'baseball'.
I am also wondering what would happen if I search for a string like 'bas' considering the fact that it's in the 3rd and 5th items of the list.