wherever we see the {or }sequence in the templatethat isthe braces enclosing the java class and method definitionwe know the format method will replace them with single bracesrather than some argument passed into the format method here' the outputpublic class myclass public static void main(string[argssystem out println("print('hello world')")the class name and contents of the output have been replaced with two parameterswhile the double braces have been replaced with single bracesgiving us valid java file turns outthis is about the simplest possible python program to print the simplest possible java program that can print the simplest possible python programkeyword arguments if we're formatting complex stringsit can become tedious to remember the order of the arguments or to update the template if we choose to insert new argument the format method therefore allows us to specify names inside the braces instead of numbers the named variables are then passed to the format method as keyword argumentstemplate ""fromtosubject{subject{message}""print(template formatfrom_email " @example com"to_email " @example com"message "here' some mail for you hope you enjoy the message!"subject "you have mail!)we can also mix index and keyword arguments (as with all python function callsthe keyword arguments must follow the positional oneswe can even mix unlabeled positional braces with keyword argumentsprint("{{label{}format(" "" "label=" ")