Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. import random as rd
  2.  
  3. numList = list(list() for _ in range(3))
  4. tempList = list()
  5.  
  6. for i in range(6):
  7.     while True:
  8.         num = rd.randint(1, 6)
  9.  
  10.         if not num in tempList:
  11.             tempList.append(num)
  12.  
  13.             break
  14.  
  15. for j in range(2):
  16.     numList[j].append(tempList[j])
  17.  
  18. for k in range(2, 6):
  19.     numList[2].append(tempList[k])
  20.  
  21. print(numList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement