watex.utils.funcutils.listing_items_format#

watex.utils.funcutils.listing_items_format(lst, /, begintext='', endtext='', bullet='-', enum=True, lstyle=None, space=3, inline=False, verbose=True)[source]#

Format list by enumerate them successively with carriage return

Parameters:
  • lst – list, object for listening

  • begintext – str, Text to display at the beginning of listing the items in lst.

  • endtext – str, Text to display at the end of the listing items in lst.

:param enum:bool, default=True,

Count the number of items in lst and display it

Parameters:

lstyle – str, default =None listing marker.

:param bullet:str, default=’-’

symbol that is used to introduce item if enum is set to False.

Parameters:
  • space – int, number of space to keep before each outputted item in lst

  • inline – bool, default=False, Display all element inline rather than carriage return every times.

  • verbose – bool, Always True for print. If set to False, return list of string litteral text.

Returns:

None or str None or string litteral if verbose is set to False.

Examples

>>> from watex.utils.funcutils import listing_items_format
>>> litems = ['hole_number', 'depth_top', 'depth_bottom', 'strata_name',
            'rock_name','thickness', 'resistivity', 'gamma_gamma',
            'natural_gamma', 'sp','short_distance_gamma', 'well_diameter']
>>> listing_items_format (litems , 'Features' ,
                           'have been successfully drop.' ,
                          lstyle ='.', space=3)