The line that contains a simile from "The Walrus and the Carpenter" is:
D. They wept like anything to see.
A simile is a figure of speech that compares two different things using the words "like" or "as." In this case, "wept like anything" is a comparison that uses "like."