Started learning Python yesterday; I know little more than what is here, below.

The random generator functions but the same number applies to each entry.

Could someone show me how to generate a unique number for each entry (one, two, three)?

Thank you.

Code so far:

import random
number_gen = random.choice(range(100))
num = str(number_gen)
for group in ("Group_A:", "Group_B:"):
print(group)
print(" one", num)
print(" two", num)
print(" three", num)
print()

Calling means using the () at the end, like when you called str in num = str(number_gen). You can create your own function that creates a random number, then call it whenever you need one.

>>> from random import randint
>>> help(randint)
Help on method randint in module random:
randint(a, b) method of random.Random instance
Return random integer in range [a, b], including both end points.
# this just saves having to use choice(range())
>>> def num():
... return randint(1,10)
...
>>> for x in ('a', 'b', 'c'):
... print(x, num())
...
a 3
b 2
c 5