I'm trying to make a function using *args. It should take in certain numbers and then output the products of the numbers multiplied by 10.
I'm learning to use *args but I'm having trouble getting the output. My result only outputs the first number in the function. I've tried using a for loop, thinking it would iterate over each character, but it didn't work.
def myfunc(*args):
for args1 in args:
return args1*10
When I run the function:
myfunc(10.1,20)
The expected output should be
(101.0,200.0)
The actual output is
(101.0)
Any help would be appreciated. Thanks.