Question #6 [15 pts]: Character Counter Using Higher-Order F…

Question #6 [15 pts]: Character Counter Using Higher-Order Function Write a higher-order function count(ch) that takes a single character ch as its input and returns another function. The returned function should take a string s and return the number of times ch appears in s. >>> count(‘s’)(‘mississippi’) 4 >>> count(‘z’)(‘hello’)       0 >>> count(‘x’)(‘example text’) 2