I have this response from a server: HTTP-Version: WEB 981.20\r\n\r\nlogintype=none&since=today
I know you can count letters by using the function len() but this function will count all letters of the response.
How can I count the letters after this phrase: HTTP-Version: WEB 981.20\r\n\r\n?
The result should be 26.
>Solution :
Try out this python code:
response = "HTTP-Version: WEB 981.20\r\n\r\nlogintype=none&since=today"
substring = response.split("HTTP-Version: WEB 981.20\r\n\r\n")[1]
print(substring)
This code just grabs whatever is after the string you provided and puts it into a substring