Ver originalfrom random import randint def azar(x): rand = {1: randint(0,9), 2: randint(10, 99), 3: randint(100, 999), 4: randint(1000,9999)} return rand[x]