' strings'{num{title}format(**dict(num= title='strings')' stringsthe module' templating system allows values to be referenced by name tooprefixed by $as either dictionary keys or keywordsbut does not support all the utilities of the other two methods-- limitation that yields simplicitythe prime motivation for this toolimport string string template('$num $title' substitute({'num' 'title''strings'}' stringst substitute(num= title='strings'' stringst substitute(dict(num= title='strings')' stringssee python' manuals for more details it' possible that you may see this alternative (as well as additional tools in the third-party domainin python code toothankfully this technique is simpleand is used rarely enough to warrant its limited coverage here the best bet for most newcomers today is to learn and use %str formator both general type categories now that we've explored the first of python' collection objectsthe stringlet' close this by defining few general type concepts that will apply to most of the types we look at from here on with regard to built-in typesit turns out that operations work the same for all the types in the same categoryso we'll only need to define most of these ideas once we've only examined numbers and strings so farbut because they are representative of two of the three major type categories in pythonyou already know more about several other types than you might think types share operation sets by categories as you've learnedstrings are immutable sequencesthey cannot be changed in place (the immutable part)and they are positionally ordered collections that are accessed by offset (the sequence partit so happens that all the sequences we'll study in this part of the book respond to the same sequence operations shown in this at work on strings--concatenationindexingiterationand so on more formallythere are three major type (and operationcategories in python that have this generic naturenumbers (integerfloating-pointdecimalfractionotherssupport additionmultiplicationetc sequences (stringsliststuplessupport indexingslicingconcatenationetc general type categories