enumerate
This commit is contained in:
parent
afdf73b772
commit
f8164789fa
1 changed files with 4 additions and 0 deletions
4
python-temel/cift.indis.yeni.enumerate.py
Normal file
4
python-temel/cift.indis.yeni.enumerate.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
l = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
|
||||
|
||||
result = [val for index, val in enumerate(l) if index % 2 == 0]
|
||||
print(result)
|
Loading…
Reference in a new issue