Verifies if giving object is list or tuple; if not returns a list with it as single element.
Project description
Works as a shortcut to this:
thing_list = “single”
- if not isinstance(thing_list, (list, tuple)):
thing_list = [thing_list]
- for thing in thing_list:
do_something(thing)