def abbreviate_dashed ( s ) : r = [ ] for part in s . split ( '-' ) : r . append ( abbreviate ( part ) ) return '-' . join ( r )
split dash words in python
Abbreviates each part of string that is delimited by a - .
def abbreviate_dashed(s):
    """Abbreviates each part of string that is delimited by a '-'."""
    r = []
    for part in s.split('-'):
        r.append(abbreviate(part))
    return '-'.join(r)