Ok the problem is that given a fraction eg:1/3 the answer 0.3333333 should represented as 0.(3)
and 0.2325555 as 0.232(5) i have figured out a way to split the string when its a single digit repeating:
using re.findall(r'^(.+?)((.)\3+)$', '42344444' )[0][:-1] (ignoring the 0. before the number)
but i want to know how to do this if the pattern is 0.324324324.. to get 0.(324)
23154545454how would you split the string into the non recurring part and the recurring part