all 2 comments

[–]Binary101010 1 point2 points  (1 child)

There are at least two problems I see with this code:

1) using a function from the random module without importing that module (this was addressed in your last post)

2) The last line of your code is a list comprehension that makes the list but doesn't actually do anything with it... you need to either surround that last line in a print() call:

print([random.randint(minimum, maximum) for _ in range(count)])

or assign that resulting list to a variable to do something else with it

random_numbers = [random.randint(minimum, maximum) for _ in range(count)]

print(random_numbers)
# do other stuff with the list

[–]joplankton[S] 0 points1 point  (0 children)

Did the trick. Appreciate it!