R String Functions In Python