Skip to content
Snippets Groups Projects
Commit 6a4be1cc authored by Martin Mareš's avatar Martin Mareš
Browse files

Seznamy: Příklad s hledáním

parent 213c75b3
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# Načítá čísla ze vstupu ukončená -1
# a pak v nich hledá.
seznam = []
while True:
x = int(input())
if x == -1:
break
seznam.append(x)
while True:
y = int(input())
if y == -1:
break
nasel = False
for x in seznam:
if x == y:
print('ANO')
nasel = True
if not nasel:
print('NE')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment