Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyton filter

ages = [5, 12, 17, 18, 24, 32]
adults = list(filter(lambda x: x >= 18, ages))

print(adults)
# [18, 24, 32]
Source by book.pythontips.com #
 
PREVIOUS NEXT
Tagged: #pyton #filter
ADD COMMENT
Topic
Name
4+1 =