Advertisement
Mofeoluwa

Untitled

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