help me deal with the problem | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

help me deal with the problem

I don't understand what happens at the 11 line https://code.sololearn.com/cAWrq66gJISK/?ref=app

13th Jan 2020, 5:01 PM
shiryaeva
shiryaeva - avatar
1 Réponse
+ 1
if a[j] == i: a[j] is 'j' element of a list. 'j' is iterator in a loop line above. 'i' could be one of all possible values determined by loop 2 lines above (max. value is 'n'). If the statement is true(a[j] is equal i), print index of element and its value.
13th Jan 2020, 5:26 PM
Aleksander Szczepura
Aleksander Szczepura - avatar