#!/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]: """Generate a list of int between mini and maxi""" return list(range(mini, maxi+1)) def randomise_with_iterator(list_from: List[int]) -> int: """Copy and randomize a list to an iterator""" randomized = list_from.copy() shuffle(randomized) while randomized: yield randomized.pop()