Advertisement
angryatti

Random Rendszámok

Dec 26th, 2021
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. import random
  2.  
  3. rendabc = list(map(chr, range(ord('A'), ord('Z')+1)))
  4. arrayofabc = list()
  5. abc = ""
  6. for j in range(100):
  7.  
  8.     for i in range(3):
  9.         valami = random.randrange(0,25)
  10.         abc = abc+rendabc[valami]
  11.  
  12.     valami = random.randrange(0,999)+1
  13.  
  14.     abc = abc+"-"+str(valami)
  15.     if abc not in arrayofabc:
  16.         arrayofabc.append(abc)
  17.     abc=""
  18. print (arrayofabc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement