Given a list of list, the task is to get only positive element from given list. Below are some ways to solve the above problem.

**Method #1: Using Iteration**

`# Python code to get positive ` `# element from list of list ` ` ` `# List Initialisation ` `Input` `=` `[[` `10` `, ` `-` `11` `, ` `222` `], [` `42` `, ` `-` `222` `, ` `-` `412` `, ` `99` `, ` `-` `87` `]] ` `Output ` `=` `[] ` ` ` `# Using iteration ` `for` `elem ` `in` `Input` `: ` ` ` `temp ` `=` `[] ` ` ` `for` `x ` `in` `elem: ` ` ` `if` `x>` `0` `: ` ` ` `temp.append(x) ` ` ` `Output.append(temp) ` ` ` `# printing output ` `print` `(` `"Initial List is :"` `, ` `Input` `) ` `print` `(` `"Modified list is :"` `, Output) ` |

*chevron_right*

*filter_none*

**Output:**

Initial List is : [[10, -11, 222], [42, -222, -412, 99, -87]] Modified list is : [[10, 222], [42, 99]]

**Method #2: Using map and list Comprehension**

`# Python code to get positive element ` `# from list of list ` ` ` `# List Initialisation ` `Input` `=` `[[` `10` `, ` `-` `11` `, ` `222` `], [` `42` `, ` `-` `222` `, ` `-` `412` `, ` `99` `, ` `-` `87` `]] ` ` ` `# Using list comprehension and map ` `temp ` `=` `map` `(` `lambda` `elem: ` `filter` `(` `lambda` `a: a>` `0` `, elem), ` `Input` `) ` `Output ` `=` `[[a ` `for` `a ` `in` `elem ` `if` `a>` `0` `] ` `for` `elem ` `in` `temp] ` ` ` `# printing output ` `print` `(` `"Initial List is :"` `, ` `Input` `) ` `print` `(` `"Modified list is :"` `, Output) ` |

*chevron_right*

*filter_none*

**Output:**

Initial List is : [[10, -11, 222], [42, -222, -412, 99, -87]] Modified list is : [[10, 222], [42, 99]]

**Method #3: Using List Comprehension**

`# Python code to get positive element ` `# from list of list ` ` ` `# List Initialisation ` `Input` `=` `[[` `10` `, ` `-` `11` `, ` `222` `], [` `42` `, ` `-` `222` `, ` `-` `412` `, ` `99` `, ` `-` `87` `]] ` ` ` `# Using list comprehension ` `Output ` `=` `[ [b ` `for` `b ` `in` `a ` `if` `b>` `0` `] ` `for` `a ` `in` `Input` `] ` ` ` `# printing output ` `print` `(` `"Initial List is :"` `, ` `Input` `) ` `print` `(` `"Modified list is :"` `, Output) ` |

*chevron_right*

*filter_none*

**Output:**

Initial List is : [[10, -11, 222], [42, -222, -412, 99, -87]] Modified list is : [[10, 222], [42, 99]]

Attention geek! Strengthen your foundations with the **Python Programming Foundation** Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the **Python DS** Course.

## Recommended Posts:

- Python Program to find Sum of Negative, Positive Even and Positive Odd numbers in a List
- Python | Program to count number of lists in a list of lists
- Python | Maximum sum of elements of list in a list of lists
- Python | Sorting list of lists with similar list elements
- Python | Merge List with common elements in a List of Lists
- Python | Check if a list exists in given list of lists
- Python | Zipping two lists of lists
- Python - Convert Lists into Similar key value lists
- Python program to find Tuples with positive elements in List of tuples
- Python - Calculate the percentage of positive elements of the list
- Python | Ways to sum list of lists and return sum list
- Python | Convert list into list of lists
- Python | Convert List of lists to list of Strings
- Python - Convert Key-Value list Dictionary to List of Lists
- Python - Convert List of Dictionaries to List of Lists
- Python | Find common elements in list of lists
- Python | Convert column to separate elements in list of lists
- Python | Uncommon elements in Lists of List
- Python program to apply itertools.product to elements of a list of lists
- Python program to get all unique combinations of two Lists

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.