Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. '''function to sum index of
  2. first occurence of "s" in each string
  3. in a list of strings'''
  4. def super_sum(slst):
  5.     total = 0
  6.     for word in slst:
  7.         total += word.index("s")
  8.     return total
  9. super_sum([])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement