bff.value_2_list

bff.value_2_list(value)

Convert a single value into a list with a single value.

If the value is alredy a sequence, it is returned without modification. Type np.ndarray is not put inside another sequence.

Strings are not considered as a sequence in this scenario.

Parameters

value (Any) – Value to convert to a sequence.

Returns

Value put into a sequence.

Return type

sequence

Examples

>>> value_2_list(42)
[42]
>>> value_2_list('Swiss')
['Swiss']
>>> value_2_list(['Swiss'])
['Swiss']