# Python-Exercise 3-23 (counting chars) (busy developer version)

**URL:** <https://forum.codewithmosh.com/t/python-exercise-3-23-counting-chars-busy-developer-version/9627>\
**Category:** Python\
**Created:** [January 2, 2022, 9:19pm UTC](https://forum.codewithmosh.com/t/python-exercise-3-23-counting-chars-busy-developer-version/9627 "2022-01-02T21:19:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![avd](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@avd](https://forum.codewithmosh.com/u/avd)\
**Post date:** [January 2, 2022, 9:19pm UTC](https://forum.codewithmosh.com/t/python-exercise-3-23-counting-chars-busy-developer-version/9627/1 "2022-01-02T21:19:31Z")

</div>

In this exercise you need to determine the most common (highest repeating) character in a sentence. While I understand the elaborate method that was used to determine that information I am curious why a more “elegant” solution wasn’t suggested at the end of the “solution” like Mosh usually does with other demonstrations.

I was able to retrieve the same output with three lines:

sentence = “This is a common interview question”  
counting\_char = Counter(sentence)  
print(counting\_char.most\_common(1))

Thanks.
