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

    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 …

  2. Generate list of random names - Python - Stack Overflow

    I'm trying to create a list of names, with each one being different. Here is my code right now, but all it does it create multiple instances of the same name. import random first_names=('John','...

  3. python - random.random vs. numPy.random - Stack Overflow

    Feb 8, 2024 · 2 I read here the following: "The Python stdlib module random contains pseudo-random number generator with a number of methods that are similar to the ones available in …

  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 …

  5. Random word generator- Python - Stack Overflow

    Using random.sample will provide you with a list of the total number of items (characters in this case) from the given object (a string object here) based on the number you want …

  6. python - How to make a random function without using any …

    Mar 5, 2023 · An example of a well-known algorithm which produces pseudo-random integer numbers, is simple enough to be programmed/understood by a beginner, and has quite good …

  7. python - Shuffling a list of objects - Stack Overflow

    How do I shuffle a list of objects? I tried random.shuffle: import random b = [object (), object ()] print (random.shuffle (b)) But it outputs: None

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

    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:

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

    Random seeds are also common to create reproducible results for research. For example, if you're a data scientist and you want to publish your results with some kind of model that uses …

  10. python - Downloading Random.py Using Anaconda - Stack Overflow

    Apr 30, 2017 · The random module is part of the Python standard library. There is no need to install it separately.