add new task
This commit is contained in:
parent
990a68bfe7
commit
d7d5b47a0b
15
practica/stepik/stepik_tasks/index_of_num_in_list.py
Normal file
15
practica/stepik/stepik_tasks/index_of_num_in_list.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
lst = input().split()
|
||||||
|
x = int(input())
|
||||||
|
n= 0
|
||||||
|
list_n= []
|
||||||
|
while n < len(lst):
|
||||||
|
for i in lst:
|
||||||
|
m = int(i)
|
||||||
|
if m ==x:
|
||||||
|
list_n.append(n)
|
||||||
|
n+=1
|
||||||
|
else:
|
||||||
|
n+=1
|
||||||
|
if len(list_n) == 0:
|
||||||
|
print ('Отсутствует')
|
||||||
|
print(" ".join(map(str, list_n)))
|
Loading…
Reference in New Issue
Block a user