the other methods discussed in table serve dual purpose to joinas they begin with string and produce sequence of substrings based upon given delimiter for examplethe call red and green and blue splitand produces the result red green blue if no delimiter (or noneis specifiedsplit uses whitespace as delimiterthusred and green and blue splitproduces red and green and blue string formatting the format method of the str class composes string that includes one or more formatted arguments the method is invoked with syntax format(arg arg )where serves as formatting string that expresses the desired result with one or more placeholders in which the arguments will be substituted as simple examplethe expression {had little {formatmary lamb produces the result mary had little lamb the pairs of curly braces in the formatting string are the placeholders for fields that will be substituted into the result by defaultthe arguments sent to the function are substituted using positional orderhencemary was the first substitute and lamb the second howeverthe substitution patterns may be explicitly numbered to alter the orderor to use single argument in more than one location for examplethe expression { }{ }{ your { formatrow boat produces the result rowrowrow your boat all substitution patterns allow use of annotations to pad an argument to particular widthusing choice of fill character and justification mode an example of such an annotation is {:-^ formathello in this examplethe hyphen (-serves as fill characterthe caret (^designates desire for the string to be centeredand is the desired width for the argument this example results in the string hello by defaultspace is used as fill character and an implied character would dictate right-justification there are additional formatting options for numeric types number will be padded with zeros rather than spaces if its width description is prefaced with zero for examplea date can be formatted in traditional "yyyy/mm/ddform as {}/{: }/{: format(yearmonthdayintegers can be converted to binaryoctalor hexadecimal by respectively adding the character boor as suffix to the annotation the displayed precision of floating-point number is specified with decimal point and the subsequent number of desired digits for examplethe expression { format( / produces the string rounded to three digits after the decimal point programmer can explicitly designate use of fixed-point representation ( by adding the character as suffixor scientific notation ( - by adding the character as suffix