Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_values_and_indices(list1):
- result = len(list1)
- for i in range(0,len(list1)):
- result = result + list1[i]
- print(result)
- sum_of_values_and_indices([1,2,3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement