data types the syntax may seem weird enough to make perl programmer feel at homebut don' worry--it is explained in all that matters for now is that we can use variable names in format strings and leave python to fill in their values simply by unpacking the dictionary returned by locals()--or some other dictionary--into the str format(method for examplewe could rewrite the "elephantexample we saw earlier to have much nicer format string with simpler field names parameter unpacking "the {animalweighs {weight}kgformat(** 'the elephant weighs kgunpacking dictionary into the str format(method allows us to use the dictionary' keys as field names this makes string formats much easier to understandand also easier to maintainsince they are not dependent on the order of the arguments notehoweverthat if we want to pass more than one argument to str format()only the last one can use mapping unpacking conversions decimal numbers when we discussed decimal decimal numbers we noticed that such numbers are output in one of two ways for exampledecimal decimal(" "decimal(' 'print(decimal decimal(" ") the first way that the decimal decimal is shown is in its representational form the purpose of this form is to provide string which if interpreted by python would re-create the object it represents python programs can evaluate snippets of python code or entire programsso this facility can be useful in some situations not all objects can provide reproducing representationin which case they provide string enclosed in angle brackets for examplethe representational form of the sys module is the string "the second way that decimal decimal is shown is in its string form this form is aimed at human readersso the concern is to show something that makes sense to people if data type doesn' have string form and string is requiredpython will use the representational form python' built-in data types know about str format()and when passed as an argument to this method they return suitable string to display themselves it is also straightforward to add str format(support to custom data types as we will see in in additionit is possible to override the data type' normal behavior and force it to provide either its string or its representational form this is done by adding conversion specifier to the field currently there are three such specifierss to force string formr to force representational formeval(