In July 1980 Superman returns from an interstellar mission to discover that the world he knew has been replaced by one in which everyone has been replaced with a counterpart of the opposite gender. Instead of a female Lois Lane this world's Daily Planet has a male reporter names Loius Lane. Instead of Jimmy Olsen there is Jenny Olsen. Wonder Woman is replaced by Wonder Warrior and so on. And the greatest hero on this world is Superwoman. There is also a Clara Kent who stragely is not the same person as Superwoman. In fact unlike her male counterpart in the real world, Clark Kent, Clara Kent is just an ordinary person.
Based on this fact as well as the fact that a file on Superwoman's enemies showed a male Mxyzptlk allowed Superman to deduce that Mxyzptlk was behind this madbness. Mxyzptlk was too vain to alter himself in any way so even in this world of reversed genders he was still male and Superwoman and Clara Kent were different people because Mxyzptlk was, inspite of his incredible powers, unaware that Superman and Clark Kent were one and the same.
When Superman confronts Mxyzptlk, he uses the magic lasso he took from Wonder Warrior to force Mxyzptlk to say his name backwards causing him to return to the 5th dimension and undoing his spell over the earth. When Superman returns to the Daily Planet, he is shocked to see Loius Lane, but it is not the same Loius Lane from the gender reversed earth: It's Lois's cousin from Pittsdale. (S No. 349: "The Turnabout Trap!")