python trim string after character