diff --git a/November/Day 8/Python/Max_Character.py b/November/Day 8/Python/Max_Character.py new file mode 100644 index 0000000..173cfcd --- /dev/null +++ b/November/Day 8/Python/Max_Character.py @@ -0,0 +1,13 @@ +""" written on march 4 2022 by +@BertinAm +the program below can detect the most frquent character in a list of them! +""" +from statistics import mode # statistics module that provides methods like the mode, median, mean etc + + +def most_common(lits): # function definition + common = mode(lits) + return common + + +print(most_common(["c", "d", "t", "c", "c", "r"])) # calling of the function most_common