Question: 
Write a function to count the most common character in a given string.


Model's Code:
def max_char(s):
    from collections import Counter
    return Counter(s).most_common(1)[0][0]



Sample Correct Code:
from collections import Counter 
def max_char(str1):
    temp = Counter(str1) 
    max_char = max(temp, key = temp.get)
    return max_char


Asserts:
assert max_char("hello world")==('l')
assert max_char("hello ")==('l')
assert max_char("python pr")==('p')


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 937 of 974: 718/937 (76.62753468516541%): success