Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python filter

number_list = range(-5, 5)
less_than_zero = list(filter(lambda x: x < 0, number_list))
print(less_than_zero)

# Output: [-5, -4, -3, -2, -1]
Source by book.pythontips.com #
 
PREVIOUS NEXT
Tagged: #python #filter
ADD COMMENT
Topic
Name
2+3 =