I want to write a function that takes either an int or a list of int as parameter and processes that values.
something like that:
def func(input):
if isinstance(input, int):
print(input)
else:
for i in input:
print(i)
this doesn't look very pythonic to me, but I don't know how to do it better. Is there a way to "loop" over the int or "pack" the int into a list that handles both options
Thanks