Python: Create a list taking alternate elements from a given list
Create List with Alternate Elements
Write a Python program to create a list taking alternate elements from a given list.
Sample Solution:
Python Code:
Sample Output:
Original list: ['red', 'black', 'white', 'green', 'orange'] List with alternate elements from the said list: ['red', 'white', 'orange'] Original list: [2, 0, 3, 4, 0, 2, 8, 3, 4, 2] List with alternate elements from the said list: [2, 3, 0, 8, 4]
Flowchart:

For more Practice: Solve these Related Problems:
- Write a Python program to extract every third element from a list.
- Write a Python program to interleave two lists alternately.
- Write a Python program to separate even and odd indexed elements into two lists.
- Write a Python program to create a list by skipping elements at specific intervals.
Go to:
Previous: Write a Python program to check if a substring presents in a given list of string values.
Next: WWrite a Python program to find the nested lists elements which are present in another list.
Python Code Editor:
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.