Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Easy solution in Clear category for Middle Characters by Marcin_Ramotowski
def middle(text):
i = len(text) // 2
return text[i] if len(text) % 2 == 1 else text[i-1:i+1]
July 29, 2021