Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. >>> import random
  2. >>> q = range(16)
  3. >>> for _ in xrange(32):
  4. ... items = [random.choice(q) for _ in range(5)]
  5. ... print len(items) == len(set(items)) or items
  6. ...
  7. [4, 5, 12, 7, 12]
  8. [4, 9, 9, 11, 5]
  9. True
  10. True
  11. True
  12. True
  13. [1, 1, 1, 5, 15]
  14. True
  15. [14, 6, 11, 11, 14]
  16. [1, 9, 8, 1, 6]
  17. True
  18. [11, 8, 1, 11, 7]
  19. [15, 14, 2, 15, 3]
  20. [5, 1, 9, 3, 5]
  21. True
  22. [4, 4, 9, 9, 0]
  23. [7, 15, 5, 8, 5]
  24. True
  25. True
  26. [14, 9, 4, 12, 9]
  27. [4, 11, 11, 7, 0]
  28. [10, 9, 4, 12, 4]
  29. True
  30. True
  31. [9, 3, 4, 1, 9]
  32. True
  33. [1, 4, 12, 7, 4]
  34. [4, 9, 4, 8, 8]
  35. [4, 10, 4, 4, 2]
  36. True
  37. True
  38. True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement