Advertisement
nitty01

Untitled

Feb 22nd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. def sum_of_values_and_indices(list1):
  2.     total =0
  3.     for i in list1:
  4.         i=i+list1.index(i)
  5.         total+=i
  6.     return total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement