Random.random
Random.random () generates a 0.0~1.0 floating-point number
Random.uniform (word meaning: uniforms, uniforms, uniform, same)
Random.uniform (parameter 1, parameter 2) This function requires a parameter that generates a floating-point number of a specified range. Two parameters one is the lower limit, the other is the upper limit
Random.uniform (1,10) and Random.uniform (10,1) are the same effect (you really like the function of how you love It)
Random.randint
Random.randint (parameter 1, parameter 2) This function requires an argument and generates an integer of the specified range. The first parameter is the lower limit, the second argument is the upper limit
Random.randrange
Random.randrange (parameter 1, parameter 2, Parameter 3 = 1) This function requires a parameter, generates an integer of the specified range, the first parameter is the lower limit, the second argument is the upper limit, the third argument is the same as the range method, and a simple filter can be made (what is the egg used for?). Random even and odd combinations ...)
Random.choice (word meaning: selection)
Random.choice (parameter 1) This function requires a parameter, which randomly gets a value in a string or an ordered list.
Example 1:random.choice ("string") this will pop out a character
Example 2:random.choice (["Oh Da", "I Da", "Meng Meng Da"]) this will pop a value, of course, the yuan can also be thrown into the random
Random.shuffle (word meaning: Shuffle)
Random.shuffle (parameter 1) This function requires a parameter, which randomly disrupts the value in a list, so the argument must be a list
Personal feeling: The function of neuropathy, I hope I can use it in my life
Random.sample (Word meaning: sample, example)
Random.sample (parameter 1, parameter 2) This function requires a parameter, randomly returns the value of a sequence (list, tuple, string), parameter 1 is a sequence, parameter 2 is range
Note: The parameter is a return type and does not change the original sequence value
The random module in Python