Advertisement
Blessing988

Untitled

Feb 21st, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def super_sum(string_list):
  2.     total_index = 0
  3.     for word in string_list:
  4.         if "s" in word:
  5.             total_index += word.index("s")
  6.     print(total_index)
  7.  
  8.  
  9. super_sum(["mustache", "greatest", "almost"]) #Example (The argument must be a list containing strings) The strings must must contain letters
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement