Delivery Hero Interview Question

Python word counting problem without using string methods