Hey, I had a query. I recently started learning Python and bumped onto this problem. Let me explain my query using code:
dixt = {'s': 1, 'a': 2, 'f': 3}
for d in dixt:
print(d)
The code in itself works fine but it doesn’t fulfil my need. This is the output it is printing:
s
a
f
I want my output to look like this:
s 1
a 2
f 3
How can I do this using Python for loop?