format_map() function is an inbuilt function in Python, which is used to return an dictionary key’s value.
Here z is a variable in which input dictionary is stored and string is the key of the input dictionary.
input_dict : Takes a single parameter which is input dictionary.
Returns key's values of the input dictionary.
Code #1 :
John's last name is Wick
Code #2 :
Code #3 :
Barry is an Engineer and he is 30 years old. Bruce is an Doctor and he is 31 years old.
The format_map() function can be used in many practical application.
George has 10 new messages
- Python | Check if given string can be formed by concatenating string elements of list
- String slicing in Python to check if a string can become empty by recursive deletion
- Python | Merge Tuple String List values to String
- Python | Sorting string using order defined by another string
- Python | Check if string ends with any string in given list
- String slicing in Python to rotate a string
- Python | Check if a given string is binary string or not
- Python | Sort each String in String list
- Python String
- Python String | min()
- Python | Add one string to another
- Python String | max()
- Python String | find()
- Python string | ascii_lowercase
- Python string | ascii_uppercase
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.