The multimode()
method is used to get a list of the most commonly occurring data values (the mode). If there are values with the same frequency, then the values are returned in the order of their occurrence.
The method returns an empty list if no data is supplied to the function.
multimode(data)
data
: The population from which multimode
has to be extracted.The method returns a list of the most occurring values in the given data.
import statisticsdata = "wefhbgssaklvgggggbvfjn bvdnesdccdsss"print("Multimode - ", statistics.multimode(data))
statistics
module in our program.data
.multimode()
function.import statisticsdata = [2, 3, 4, 2, 3, 2, 1, 6, 8, 3, 2, 4, 2, 3, 3]print("Multimode - ", statistics.multimode(data))
statistics
module in our program.data
.multimode()
function.