i am trying to check and print if following list contains specific string or substring using Python,
This is my input
[
[
"SessionTimeOut: Request reach to it's max time. {'VwasKXznXVVzYU6iAAAB': None} were registered but ['192.168.2.2', '192.168.2.3'] were expected."
],
[
"CommonException: element with 'id' was not found"
],
[
"JenkisException: Element missing because service was down"
]
]
Now i want to get the output string if it contains
"SessionTimeOut: Request reach to it's max time.
I am able to check it this way
print('SessionTimeOut: Request reach to it's max time.' in str(response['data']))
It returns True
but i also want that complete string
I am able to print that as response['data'][0][0]
this is not a good idea.
I want to printout the complete string dynamically which contains that text, How can i achieve this. Thank you.