A power supply includes a body, a number of cables, a first connector, and a second connector. The first and second connectors are connected to the body of the power supply via the cables. The first connector includes a first connecting portion. The second connector includes a second connecting portion, operable to engage with the first connecting portion.