You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
395 B
19 lines
395 B
#!/usr/bin/env python3 |
|
# -*- coding: utf-8 -*- |
|
|
|
from typing import List |
|
from random import shuffle |
|
|
|
|
|
MIN = -1000 |
|
MAX = 1000 |
|
|
|
|
|
def generate_numbers_list(mini: int, maxi: int) -> List[int]: |
|
return list(range(mini, maxi+1)) |
|
|
|
def randomise_with_iterator(list_from: List[int]) -> int: |
|
randomized = list_from.copy() |
|
shuffle(randomized) |
|
while randomized: |
|
yield randomized.pop()
|
|
|