The answer to the joke that asks, "What happened to the peanut who went walking late at night?" is that the peanut was assaulted. This answer serves as a pun due to its homophonic resemblance to "a salted."
There are several variations to this joke, including "Two peanuts were walking down the street; one was assaulted."
The joke also makes an appearance in the "Whither Canada" episode of "Monty Python's Flying Circus," in a sketch in which the British Army developed a joke that apparently has the power to cause those who hear it to laugh themselves to death. The Germans attempt to turn this peanut joke into a similarly powerful counterweapon but are unable to translate it effectively.