What is the point of using range combined with randint?

what’s the difference between:

random_list = [random.randint(1,101) for i in range(101)]


random_list = [random.randint(1,101)]

If you’re asking about code that uses feature you know nothing about, then the reasonable answer is to go learn that feature isn’t it?

Or, if you do know what each thing there does, would you still argue that they’re equivalent? If so, what is that argument?

There are several things in those pieces of code. Since they both use random, perhaps it has nothing to do with random and perhaps you could instead replace it with a simpler value, like 0:

a = [0 for i in range(101)]
b = [0]