I train to work with the for loop: Does not iterate over the list, performs the first iteration ('Yes'), regardless of whether there is a name in the list or not. Help please, the answer is not found in the internet.
name = input("ΠΠ²Π΅Π΄ΠΈΡΠ΅ ΠΈΠΌΡ Π΄Π»Ρ ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ: ") names = ["Kate", "Elena", "Sergej", "Oleg", "Vasya"] for name in names: if name in names: print('Yes') else: print('No')