You've seen how a for loop runs the same code once for every item in a list. Here you'll write one yourself instead of printing each item by hand.
A team tracks the cities its servers run in. Loop over the list and print each city on its own line.
Your tasks
Given this starting value:
cities = ["Dallas", "London", "Tokyo"]
1. Write a for loop that goes through each item in cities
2. Inside the loop, print the current city
The loop variable should describe a single item — city is a good name.
Expected output
Constraints
- Use a
for loop to go through the list — do not write three separate print() calls
- Print each city on its own line
- Do not change the
cities list