This commit is contained in:
adii1823
2021-10-28 17:38:16 +05:30
parent ee641c189f
commit ef37ce0c4e
46 changed files with 524 additions and 0 deletions
@@ -0,0 +1,6 @@
# dictionary.comprehensions.positions.py
word = 'Hello'
positions = {c: k for k, c in enumerate(word)}
print(positions) # prints: {'H': 0, 'e': 1, 'l': 3, 'o': 4}