The dirt on electrical cords can be removed with the help of an ordinary eraser
Experience shows that cleaning electrical wires with fluids containing spirit can make them sticky and lead to the device malfunctioning. That’s why you should give preference to using an alternative method to get rid of the dirt on them — try a simple eraser.