I have the general idea of how to do this in Java, but I am learning Python and not sure how to do it.
I need to implement a function that returns a list containing
def skip_elements(elements):
new_list = []
for index,element in enumerate(elements):
if index == 0:
new_list.append(element)
elif (index % 2) == 0:
new_list.append(element)
return new_list
Also can use for loop + enumerate. elif (index % 2) == 0: ## Checking if number is even, not odd cause indexing starts from zero not 1.