Paul McGuire wrote: > On Mar 30, 2:09 pm, Michael Bentley <[EMAIL PROTECTED]> wrote: > >>On Mar 30, 2007, at 10:38 AM, kevinliu23 wrote: >> >> >> >> >> >> >>>I want to be able to insert a '-' character in front of all numeric >>>values in a string. I want to insert the '-' character to use in >>>conjunction with the getopt.getopt() function.
' '.join(map(lambda x: '-' + x, s.split())) assuming that you just want to put a "-" in front of each field, regardless of its content. John Nagle -- http://mail.python.org/mailman/listinfo/python-list