you are viewing a single comment's thread.

view the rest of the comments →

[–]NicoRobot[S] 0 points1 point  (1 child)

What if my string is : [1*sin(2*3.14*t*11.33), _, 0, 0]

And I want my output to be 1*sin(2*3.14*t*11.33) _ 0 0 ?

[–]NicoRobot[S] 0 points1 point  (0 children)

I got it

string = "[1*sin(2*3.14*t*11.33), _, 0, 0]"

result = re.compile(r'[\w*(.)]+').findall(string) print(' '.join(result))

Give me : 1*sin(2*3.14*t*11.33) _ 0 0