Q4Single correct3 Marks18 Dec 2025
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:
mchar = char
mval = D[char]
print(mchar)
```