fork download
  1. str = "4,5cm x55x 22cm ";
  2. str = str.replace('cm', '').replace(' ', '').split('x') # ['4,5', '55', '22']
  3. str = 'cm x '.join(str)+"cm"
  4. print str # retorna 4,5cm x 55cm x 22cm
  5.  
Success #stdin #stdout 0.02s 6740KB
stdin
Standard input is empty
stdout
4,5cm x 55cm x 22cm