About 50 results
Open links in new tab
  1. How exactly does random.random() work in python? - Stack Overflow

    Feb 2, 2017 · The random () method is implemented in C, executes in a single Python step, and is, therefore, threadsafe. The _random is a compiled C library that contains few basic operations, which …

  2. Python Random Function without using random module

    Feb 25, 2015 · I need to write the function - random_number (minimum,maximum) Without using the random module and I did this: import time def random_number (minimum,maximum): now = str …

  3. python - Random string generation with upper case letters and digits ...

    We import string, a module that contains sequences of common ASCII characters, and random, a module that deals with random generation. string.ascii_uppercase + string.digits just concatenates …

  4. python - How can I randomly select (choose) an item from a list (get a ...

    As of Python 3.6 you can use the secrets module, which is preferable to the random module for cryptography or security uses. To print a random element from a list:

  5. Is there an alternative for the random module in Python?

    Jun 7, 2012 · I was using Trypython.org, and found that there was no random module included, so got curious. Is there an alternative method to generate random numbers within a certain range without …

  6. python - How do I create a list of random numbers without duplicates ...

    Mar 18, 2012 · I tried using random.randint(0, 100), but some numbers were the same. Is there a method/module to create a list unique random numbers?

  7. python - Random is barely random at all? - Stack Overflow

    47 Before blaming Python, you should really brush up some probability & statistics theory. Start by reading about the birthday paradox By the way, the random module in Python uses the Mersenne …

  8. set random seed programwide in python - Stack Overflow

    Jul 17, 2012 · The main python module that is run should import random and call random.seed(n) - this is shared between all other imports of random as long as somewhere else doesn't reset the seed.

  9. What does random.Random (not random.random) from the random …

    Dec 14, 2018 · 1 I would like to get a lucid explanation on what the random.Random function/class actually does. This is what Python's random module has to say about it. Random number generator …

  10. What does `random.seed()` do in Python? - Stack Overflow

    random.seed(a, version) in python is used to initialize the pseudo-random number generator (PRNG). PRNG is algorithm that generates sequence of numbers approximating the properties of random …