MCPcopy Index your code
hub / github.com/python/cpython / create_random_list

Method create_random_list

Lib/test/test_free_threading/test_heapq.py:239–243  ·  view source on GitHub ↗

Create a list of random numbers between a and b (inclusive).

(a, b, size)

Source from the content-addressed store, hash-verified

237
238 @staticmethod
239 def create_random_list(a, b, size):
240 """
241 Create a list of random numbers between a and b (inclusive).
242 """
243 return [randint(-a, b) for _ in range(size)]
244
245
246if __name__ == "__main__":

Calls 1

randintFunction · 0.85

Tested by

no test coverage detected