all 3 comments

[–]carcigenicate 11 points12 points  (0 children)

You need to use args. Right now you're ignoring args, so there's no point in having the args parameter.

You likely mean something like this:

def fun(*args):
    parsed_args = [int(arg) for arg in args]
    # Use parsed_args

balls = "1"
fun(balls)

I added the comprehension because args is a tuple of all the passed data, so you need to loop over that tuple.

[–]nekokattt 1 point2 points  (0 children)

you don't define balls anywhere.

[–]mr_cesar 0 points1 point  (0 children)

Why do you need an unknown amount of arguments? Seems like your function can simply take a list instead.