String format_map() in python takes dictionary as input and returns its key values in output.

t={‘a’:’sky’,’b’:’overcast’}

t is a dictionary.

print(‘The {a} is {b}’.format_map(t))

Output: The sky is overcast

It had printed key values of dictionary in place of {a},{b}.

How to use Str.format_map() in Python:

How to use str.format_map in python
1.String format_map() in Python

 

By SC

One thought on “Str.format_map”

Leave a Reply

Your email address will not be published. Required fields are marked *