code: def typeseq(types):
      
      ret = ""
      for t in types:
          ret += termcap.get(fmttypes[t])
      
      return ret
docs: Returns an escape for a terminal text formatting type, or a list of types.
  
      Valid types are:
          * 'i' for 'italic'
          * 'b' for 'bold'
          * 'u' for 'underline'
          * 'r' for 'reverse'