Java String Manipulation Functions Python Definition