Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import itertools
- def test():
- for i in itertools.count():
- # generate 2 bytes = 16 bits of randomness, twice
- a = os.urandom(2)
- b = os.urandom(2)
- # compare the two
- if a == b:
- return i
- for i in range(100):
- print(test())
Advertisement
Add Comment
Please, Sign In to add comment