Java Get Substring From String Python Functions W3schools