SNIPPET
1 Upvote

Filtering Lists Using Comprehension

Python
General Python

original_list = [10,11,12,13]

new_list = [n for n in original_list if n > 11]

>> [12, 13]

By detro - Last Updated Oct. 30, 2021, 1:34 p.m.

COMMENTS
RELATED SNIPPETS
Python For Else Loop
Python
General Python

Loop

2
1
Search Snippets by Tag: