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 - 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:

  3. python - How do I get the 'random' module to work? Did I forget to ...

    Aug 4, 2020 · As the traceback says, random is a module that contains functions/classes that you may call like random.randint() etc.

  4. 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 …

  5. 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?

  6. 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 …

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

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

  8. 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 …

  9. Python "import random" Error - Stack Overflow

    By naming your script random.py, you've created a naming conflict with the random standard library module. When you try to run your script, the directory containing the script will be added to the start …

  10. 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 …