2.2.16. czekitout.convert.to_list_of_strs

to_list_of_strs(obj, obj_name)[source]

Convert input object to a list of strings.

If the input object is not a sequence of string-like objects, then a TypeError exception is raised with the message:

The object ``<obj_name>`` must be a sequence, where each element in the
sequence is an instance of the class `str` or `bytes`.

where <obj_name> is replaced by the contents of the string obj_name.

Parameters:
objany type

Input object.

obj_namestr

Name of the input object.

Returns:
resultlist (str)

The object resulting from the conversion.