next and final string topic string formatting method calls as mentioned earlierpython and introduced new way to format strings that is seen by some as bit more python-specific unlike formatting expressionsformatting method calls are not closely based upon the language' "printfmodeland are sometimes more explicit in intent on the other handthe new technique still relies on core "printfconceptssuch as type codes and formatting specifications moreoverit largely overlaps with--and sometimes requires bit more code than--formatting expressionsand in practice can be just as complex in many roles because of thisthere is no best-use recommendation between expressions and method calls todayand most programmers would be well served by cursory understanding of both schemes luckilythe two are similar enough that many core concepts overlap formatting method basics the string object' format methodavailable in python and xis based on normal function call syntaxinstead of an expression specificallyit uses the subject string as templateand takes any number of arguments that represent values to be substituted according to the template its use requires knowledge of functions and callsbut is mostly straightforward within the subject stringcurly braces designate substitution targets and arguments to be inserted either by position ( { })or keyword ( {food})or relative position in and later ({}as we'll learn when we study argument passing in depth in arguments to functions and methods may be passed by position or keyword nameand python' ability to collect arbitrarily many positional and keyword arguments allows for such general method call patterns for exampletemplate '{ }{ and { }template format('spam''ham''eggs''spamham and eggsby position template '{motto}{porkand {food}template format(motto='spam'pork='ham'food='eggs''spamham and eggsby keyword template '{motto}{ and {food}template format('ham'motto='spam'food='eggs''spamham and eggsby both template '{}{and {}template format('spam''ham''eggs''spamham and eggsby relative position new in and string fundamentals