def iterit(*args, **kwargs):
This takes some input (int, string, list, iterable, whatever) and
makes sure it is an iterable, making it a single item list if not.
Importantly, it does rational things with strings.
You can pass it more than one item. Cast is optional.
offsets = iterit(offsets, cast=int)