Question 4
What is the output of the following snippet of code? sentence = 'python,is,fun,and,learning,python,is,great' D = dict() for word in sentence.split(','): for char in word: if char not in D: D[char] = 0 D[char] += 1 mchar, mval = '', 0 alpha = 'abcdefghijklmnopqrstuvwxyz' for char in alpha: if char not in D: continue if D[char] >= mval: mval = D[char] mchar = char print(mchar)
n
o
i
p