0

so I was coding a library (again) for fun:

import random
def pickRandom(value):
    return random.random(value)
print(pickRandom(10, 2, 40))

But when I run it, I get:

TypeError: pickRandom() takes 1 positional argument but 4 were given

What I'm trying to do here is I want to have multiple parameters in one function with typing just one parameter name. example: value. I want to have multiple values in that one parameter. instead of typing them all like parmeter1 parameter2. I'm pretty sure this is possible because of the "random" module.

Sanjay SS
  • 568
  • 4
  • 14
Rydex
  • 395
  • 1
  • 3
  • 9

0 Answers0