Generate list of random integers in Python.

I use this for testing and that is about it.

import random
def randomArr(length, max):
    arr = []
    for i in range(0, length):
        arr.append(random.randint(0, max))
    return arr
This entry was posted in Programming and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.