I have a string 'Predicate(big,small)'
How do I derive the following list of strings from that, ['Predicate','(','big',',','small',')']
The names can potentially be anything, and there can also be spaces between elements like so (I need to have the whitespace taken out of the list), Predicate (big, small)
So far I've tried this, but this is clearly not the result that I want
>>> str1 = 'Predicate(big,small)'
>>> list(map(str,str1))
Output:
['P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '(', 'b', 'i', 'g', ',', 's', 'm', 'a', 'l', 'l', ')']