we can even do multiple levels of lookup if we have nested data structures would recommend against doing this oftenas template strings rapidly become difficult to understand if we have dictionary that contains tuplewe can do thisemails (" @example com"" @example com"message 'emails'emails'subject'"you have mail!"'message'"here' some mail for you!template ""fromtosubject{ [subject]{ [message]}""print(template format(message)object lookups indexing makes format lookup powerfulbut we're not done yetwe can also pass arbitrary objects as parametersand use the dot notation to look up attributes on those objects let' change our -mail message data once againthis time to classclass emaildef __init__(selffrom_addrto_addrsubjectmessage)self from_addr from_addr self to_addr to_addr self subject subject self message message email email(" @example com"" @example com""you have mail!""here' some mail for you!"template ""fromtosubject{ subject{ message}""print(template format(email)