my_array=[1,2,3]
my_array1=['John','Tom','Peter']
search=int(input("Enter your number"))
for i in range(0,3):
if search==my_array[i]: ### can you please point out the purpose of this '[i]' ? what does it do?
print(my_array1[i]) ### also this one
Aucun commentaire:
Enregistrer un commentaire