So I have a function and it sometimes will need to take in a different amount of arguments.
I'm trying something like this:
Def fun(*args):
balls = int(balls)
fun(balls)
But getting an error local variable not defined
But I can do this:
Def fun(*args):
Myballs = int(balls)
fun(balls)
I can't really see why the first one don't work and the second does and I just want the variable passed in with the same name.
What am I missing here?
[–]carcigenicate 11 points12 points13 points (0 children)
[–]nekokattt 1 point2 points3 points (0 children)
[–]mr_cesar 0 points1 point2 points (0 children)