Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_values_and_indices(a_number_list):
- total=0
- for index, number in enumerate(a_number_list):
- total += (index + number)
- print(total)
- sum_of_values_and_indices([0, 0, 0, 0]) #Example (the argument must be a list containing only numbers)
Advertisement
Add Comment
Please, Sign In to add comment