import res = 'feature.append(freq_and_feature(text, freq))'print([x for x in re.split(r'[\W_]+', s) if x])
Standard input is empty
['feature', 'append', 'freq', 'and', 'feature', 'text', 'freq']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!