Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''function to sum index of
- first occurence of "s" in each string
- in a list of strings'''
- def super_sum(slst):
- total = 0
- for word in slst:
- total += word.index("s")
- return total
- super_sum([])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement