The code I’m currently using is:
def f(*args):
lst=[str(i) for i in args]
if len(lst)==1:lst = lst[0]
return lst
What I would like is:
a=f(1) #'1', not [1]
a,b = f(1,2) #'1', '2'
Only one argument would be a list, which would be represented by a.
What alternative exists aside from using an if statement?
Yes: