vendredi 24 janvier 2020

Generate random integers between1000 and 9999

import random

liste=[i for i in range(1000,9999)]

if len(set(str(i))) == len(str(i))
   a=random.choise(liste)
   print(a)

random numbers but unrepeated! for example: '1242' no way! because; '2' twice written




Aucun commentaire:

Enregistrer un commentaire