Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def my_find1(word, character_to_search_for):
  2. letter_found = []
  3. word = word.lower()
  4. character_to_search_for = character_to_search_for.lower()
  5. for count in range(len(word)):
  6. if word[count] == character_to_search_for:
  7. letter_found.append(count)
  8. return letter_found
  9. print(my_find1("banana", "a"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement