count in list
This commit is contained in:
parent
6e182d0c2a
commit
ac40da0d95
8
count.in.list.py
Normal file
8
count.in.list.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
a = [1, 2, 2, 3, 4, 5, 2, 1, 2, 3, 1, 2]
|
||||||
|
val = int(input('Aranacak değeri giriniz:'))
|
||||||
|
|
||||||
|
count = 0
|
||||||
|
for i in a:
|
||||||
|
if i == val:
|
||||||
|
count += 1
|
||||||
|
print(count)
|
Loading…
Reference in New Issue
Block a user