+ 1

Please do complete it.

The skip_elements function returns a list containing every other element from an input list, starting with the first element. Complete this function to do that, using the for loop to iterate through the input list. def skip_elements(elements): #Initialize variables new_list = [ ] # Iterate through the list for _______: # Does this element belong in the resulting list? if ______: # Add this element to the resulting list # Increment i ___ return _____ print(skip_elements(["a", "b", "c", "d", "e", "f", "g"])) # Should be ['a', 'c', 'e', 'g'] print(skip elements ([ 'Orange', Pineapple', 'Strawberry', 'Kiwi', "Peach'])) # Should be ['Orange', 'Strawberry', "Peach'] print(skip elements ([])) # Should be []

16th Jul 2020, 7:56 AM
Devendrasingh Rathod
Devendrasingh Rathod - avatar
4 Réponses
+ 6
I would recommend you to work through the python tutorial from sololearn. Thanks!
16th Jul 2020, 9:32 AM
Lothar
Lothar - avatar
+ 2
I need to fillup the blank spaces but it showing error.
16th Jul 2020, 8:03 AM
Devendrasingh Rathod
Devendrasingh Rathod - avatar
+ 1
This is the question and answer section. What's your question?🙂🙂
16th Jul 2020, 8:00 AM
Tomiwa Joseph
Tomiwa Joseph - avatar