Convert string by separating number and character and preserving the order Python

I have this string:

'w[0]<=0.7,w1<=0.6,w[2]<=0.2,w[3]<=0.1'

and I would like to translate it into

this one.

how is it possible? thanks



Read more here: https://stackoverflow.com/questions/64396512/convert-string-by-separating-number-and-character-and-preserving-the-order-pytho

Content Attribution

This content was originally published by Daniele at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: