Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python for loop

scores = [70, 60, 80, 90, 50]

filtered = []

for score in scores:
    if score >= 70:
        filtered.append(score)

print(filtered)
Code language: Python (python)
Source by www.pythontutorial.net #
 
PREVIOUS NEXT
Tagged: #python #loop
ADD COMMENT
Topic
Name
7+1 =