from parse impor * str = ' 12 , 34 ' # Incorrect with search print(search('{:^},{:^}', a)) <Result ('12', '3') {}> # Correct with parse print(parse('{:^},{:^}', a)) <Result ('12', '34') {}>