import re s = "one two 3.4 5,6 seven.eight nine,ten"print re.split('\s|(?<!\d)[,.](?!\d)', s)
Standard input is empty
['one', 'two', '3.4', '5,6', 'seven', 'eight', 'nine', 'ten']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!