Powershell Right String Function In Python