I'm making a random list generator function using a list comprehension, and keep receiving: TypeError: random_list() missing 1 required positional argument: 'length' I've noticed if I remove the length parameter the function works but I want to use the parameter. (Edit) for those who were confused, one of the comments were able to clarify what I was doing wrong, the issue wasn’t the code itself but rather how I was calling the function to test it. I’m relatively new to Python so bear with me. Thank you guys for your help.
def random_list(length, low=0, high=100):
import random
return [random.randint(low, high) for i in range(10)]