I have a dictionary and I want to print the key and values of this in f-strings format.
Sample 1:
dic = {'A': 1, 'B': 2}
Output: "This is output A:1 B:2"
Sample 2:
dic = {'A': 1, 'B': 2, 'C': 3}
Output: "This is output A:1 B:2 C:3"
I would like to request a general answer so that I could add more key-value pairs.