dict comprehension python

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

Here is what the above code is Doing:
1. We create an empty dictionary.
2. We create a for loop that iterates through the numbers 1 through 10.
3. We create a key:value pair in the dictionary where the key is the number from the list and the value is the square of that number.
4. We print out the dictionary to see what it looks like.