parameters: (items: Collection[Any], columns=2, printer=print)
docstring: Split flat list to columns and print them.
  
      >>> print_in_columns(['a', 'b', 'c', 'd', 2])
      a   c
      b   d
docstring_summary: Split flat list to columns and print them.
docstring_tokens: Split flat list to columns and print them .
function: def print_in_columns(items: Collection[Any], columns=2, printer=print):
      """
      Split flat list to columns and print them.
  
      >>> print_in_columns(['a', 'b', 'c', 'd', 2])
      a   c
      b   d
      """
      row_count = int(ceil((len(items) / columns)))
      text_columns = list(zip_longest(*[iter(items)] * row_count, fillvalue=""))
      column_widths = (max(len(x) for x in word) for word in text_columns)
      template = "   ".join("%%-%ss" % w for w in column_widths)
  
      for row in zip(*text_columns):
          printer(template % row)
function_tokens: def print_in_columns ( items : Collection [ Any ] , columns = 2 , printer = print ) : row_count = int ( ceil ( ( len ( items ) / columns ) ) ) text_columns = list ( zip_longest ( * [ iter ( items ) ] * row_count , fillvalue = "" ) ) column_widths = ( max ( len ( x ) for x in word ) for word in text_columns ) template = "   " . join ( "%%-%ss" % w for w in column_widths ) for row in zip ( * text_columns ) : printer ( template % row )