As a follow up to this question, I have an expression such as this:['(', '44', '+(', '3', '+', 'll', '))']
which was created by using re.findall('\w+|\W+',item)
method, however within this list of strings, there are two errors. One is the '+(' and the other is the '))'.
Is there a pythonic way that I could split just the operators such that the list would be something like ['(', '44', '+','(', '3', '+', 'll', ')',')']
.
(keep the digits/letters together, separate the symbols)
Thanks