get all keys and values from dictionary python

#python 3
for k,v in dict.items():
    print(k, v)

Here is what the above code is Doing:
1. We create a dictionary with some key-value pairs.
2. We use a for loop to iterate over the dictionary.
3. We use the items() method to get the key-value pairs.
4. We print the key and value of each pair.