Python: Extract a specified column from a given nested list
Extract Column from Nested List
Write a Python program to extract a specified column from a given nested list.
Visual Presentation:

Sample Solution:
Python Code:
Sample Output:
Original Nested list: [[1, 2, 3], [2, 4, 5], [1, 1, 1]] Extract 1st column: [1, 2, 1] Original Nested list: [[1, 2, 3], [-2, 4, -5], [1, -1, 1]] Extract 3rd column: [3, -5, 1]
Flowchart:

For more Practice: Solve these Related Problems:
- Write a Python program to extract multiple columns from a nested list.
- Write a Python program to retrieve the first column of a nested list.
- Write a Python program to flatten a nested list column-wise.
- Write a Python program to sort a nested list based on a specific column.
Go to:
Previous: Write a Python program to remove a specified column from a given nested list.
Next: Write a Python program to rotate a given list by specified number of items to the right or left direction.
Python Code Editor:
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.