We can substitute variables in string using format() method of string and passing the keyword arguments in the format method, arguments name must match the name of variable names in the string we would like to substitute. You can also unpack dictionary where dictionary key will be name of variables in the target string.
Another way we can use for interpolation using the format_map() method which takes function vars() as an argument, which contains all the variables we defined in the module.
#python #pythontutorial #pythoncoding