Hello
I’m trying to create a program for learning vocabulary and I have a problem with nesting the for loop, namely in the following code I do not know how to make the external iterator not iterate each element from the inner loop, but jump to the next element. Below is an excerpt from the problematic code
pol=[‘biały’, ‘czarny’,‘zielony’]
ang=[‘white’, ‘black’,‘green’]
for i in pol:
for j in ang:
typ=input('Write a word < '+i+ ’ > in english: ')
if typ==j:
print(‘Good’)
else:
print(‘Wrong’)
break
created
last reply
- 4
replies
- 633
views
- 2
users