Python Dict To String Example

When formatting a character string, if the character string template to be formatted contains multiple variables, then you should provide multiple variables in order. This method is suitable for the case where a small number of variables are contained in the string template like below. >>> print(‘%s love %s’ % (‘I’, ‘python’)) I love python