Dictionary Comprehensions
This commit is contained in:
parent
c90a0d2705
commit
68805b2d4b
5
python-temel/sozluk.iclemleri.2.py
Normal file
5
python-temel/sozluk.iclemleri.2.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
d = {}
|
||||
for i in [1, 2, 3, 4]:
|
||||
d[i] = str(i)
|
||||
|
||||
print(d)
|
2
python-temel/sozluk.iclemleri.py
Normal file
2
python-temel/sozluk.iclemleri.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
d = {i: str(i) for i in [1, 2, 3, 4, 5] }
|
||||
print(d)
|
Loading…
Reference in New Issue
Block a user