42.7k views
1 vote
How can I incorporate a for loop with a list?

How can I incorporate a for loop with a list?-example-1

1 Answer

3 votes

Answer:

You can call each element in a for loop using: for element in [list name]: ...

Step-by-step explanation:

for element in vowels:

Hint = Hint.replace(element, "*")

Keep in mind, this is only for the part where you modify Hint with Hint.replace().

User Palpatim
by
3.6k points