Dictionary Comprehension

PHOTO EMBED

Tue Jun 25 2024 02:55:56 GMT+0000 (Coordinated Universal Time)

Saved by @pynerds #python

D = {num: num ** 2 for num in range(1, 11)}

print(D)
content_copyCOPY

https://www.pynerds.com/understand-dictionary-comprehension-in-python/