Cast to list
Casts the provided value as a list if it's not one.
- Use
isinstance()
to check if the given value is enumerable. - Return it by using
list()
or encapsulated in a list accordingly.
Casts the provided value as a list if it's not one.
isinstance()
to check if the given value is enumerable.list()
or encapsulated in a list accordingly.