Pregunta de entrevista de Delivery Hero

Python word counting problem without using string methods