I want (202, 233)
and (286, 298)
from the following string as separate two substrings.
x = "[977, 1, 0, (202, 233), (286, 298)]"
What I tried till now is given below
char1 = '('
char2 = ')'
substr1 = x[x.find(char1) : x.find(char2)]
It gives me output as (202, 23
which is not the same as required. Also I am not able to find the second substring using this way.
Any help is appreciated.