def generate_numbers(): data = [] while len(data) < 1001: numbers = np.random.choice(a=4, size=13).tolist() data.append(numbers) return data