Write a python function that returns biggest character in a string


Topic: Write a python function that returns biggest character in a string

Solution

from functools import reduce
def biggest_char(string):
    if not isinstance(string, str):
        raise TypeError
    return reduce(lambda x, y: x if ord(x) > ord(y) else y, string)



List all Python Programs