def condense_zero_units(css):
 return re.sub('([\\s:])(0)(px|em|%|in|cm|mm|pc|pt|ex)', '\\1\\2', css)

def condense_zero_units ( css ) : return re . sub ( '([\\s:])(0)(px|em|%|in|cm|mm|pc|pt|ex)' , '\\1\\2' , css )
replace 0 with 0 .