Please make use of the following code to extract the string between the tags as shown below,
import re
str = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<string xmlns=\"http://www.PY.com/\">PYTHON123.PYTHON123</string>"
m = re.search('<string.*>(.*?)</string>', str);
print (m.group(1));
OUTPUT
PYTHON123.PYTHON123
While r.content gives you access to the raw bytes of the response payload, you will often want to convert them into a string using a character encoding such as UTF-8. The response will do that for you when you access using .text method:
response.text
'{"current_user_url":"https://api.github.com/user","current_user_authorizations_html_url":"https://github.com/settings/connections/applications{/client_id}","authorizations_url":"https://api.github.com/authorizations","code_search_url":"https://api.github.com/search/code?q={query}"}'