Update python.md

master
Matt Huntington 8 years ago committed by GitHub
parent f490ad34f6
commit d21c1e1d4a

@ -210,7 +210,14 @@ The process of looping through an array can be simplified with a `for` loop:
```python ```python
foods = ['hot dogs', 'beer', 'bald eagles'] foods = ['hot dogs', 'beer', 'bald eagles']
for food in foods: for food in foods:
print(food) print(food)
```
You can loop through a set of numbers using a `range`
```python
for x in range(0, 3):
print(x)
``` ```
### ACTIVITIES ### ACTIVITIES

Loading…
Cancel
Save