Fix: Ensure all skills are tracked as files, not submodules
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
def solution(lst):
|
||||
"""Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.
|
||||
|
||||
|
||||
Examples
|
||||
solution([5, 8, 7, 1]) ==> 12
|
||||
solution([3, 3, 3, 3, 3]) ==> 9
|
||||
solution([30, 13, 24, 321]) ==>0
|
||||
"""
|
||||
return sum(x for i, x in enumerate(lst) if i % 2 == 0 and x % 2 == 1)
|
||||
Reference in New Issue
Block a user