Basically, I have scraped some tennis scores from a website and dumped them into a dictionary. However, the scores of tiebreak sets are returned like "63" and "77". I want to be able to add a starting parenthesis after the 6 or 7 and close the parentheses at the end of the entire number. So a pseudo code example would be:
>>>s = '613'
>>>s_new = addParentheses(s)
>>>s_new
6(13)
The number after the 6 or 7 can be a one or two digit number from 0 onwards (extremely unlikely that it will be a 3 digit number, so I am leaving that possibility out). I tried reading through some of the regex documentation on the Python website but am having trouble incorporating it in this problem. Thanks.