Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

filter list with python

scores = [70, 60, 80, 90, 50]
filtered = filter(lambda score: score >= 70, scores)

print(list(filtered))

# Output:
[70, 80, 90]
Source by www.pythontutorial.net #
 
PREVIOUS NEXT
Tagged: #filter #list #python
ADD COMMENT
Topic
Name
7+3 =