Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_values_and_indices(list1):
- total =0
- for i in list1:
- i=i+list1.index(i)
- total+=i
- return total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement