President Trump used to boast that one of the things that made “life worth living” was sleeping with his friends’ wives, according to a new tell-all book.

“In pursuing a friend’s wife, he would try to persuade the wife that her husband was perhaps not what she thought,” author Michael Wolff quotes a Trump friend as saying.

Before he was president, Trump would have his secretary ask the friend to drop by his office, where he would subject him to “more or less constant sexual banter,” according to “Fire and Fury: Inside the Trump White House,” a copy of which was obtained by The Post.

With the wife listening in on speakerphone, Trump would say: “Do you still like having sex with your wife? How often? You must have had a better f–k than your wife? Tell me about it.

“I have girls coming in from Los Angeles at three o’clock. We can go upstairs and have a great time. I promise.”

One pal who was also friends with Bill Clinton found the two men eerily similar — “except that Clinton had a respectable front and Trump did not,” according to the book, which comes out Jan. 9.