I have tried
re.findall(r'(\d\*\*\d)','3*2**3**2*5**4**')
and the output is ['2**3', '5**4']
my desired output is ['2**3','3**2', '5**4'] what change is needed in in re
Change your regex to use a lookahead assertion which will not consume the string while matching:
import re
string = '3*2**3**2*5**4**'
print(re.findall(r'(?=(\d\*\*\d))', string))
>> ['2**3', '3**2', '5**4']