Getty/NBC Composite

Donald Trump 'Apprentice' Taught Me A Lesson ... Good Ratings Excuse Mean, Rude Behavior!!!

Donald Trump says he learned people could get away with abhorrent behavior as long as they had good ratings like he did on "The Apprentice" ... according to a bombshell book.

The ex-prez made the claims during an interview with Variety Co-Editor-in-Chief Ramin Setoodeh for, "Apprentice in Wonderland: How Donald Trump and Mark Burnett Took America Through the Looking Glass" which dropped Tuesday.

We've already told you a little about the new book ... but, just as a refresher, DJT sat for several interviews with Setoodeh and, the portrayal of 45 as a lonely, occasionally dotty man ex-TV star isn't flattering.

In any case ... Setoodeh says Trump reflected on his big takeaway from "The Apprentice" by saying, "It’s all about one thing: ratings. If you have ratings, you can be the meanest, most horrible human being in the world."

A pretty cynical view of Hollywood ... but, it sorta sums up "The Apprentice" in a nutshell -- which many watched just to see who Trump would fire week to week.

Plus, Trump's made similar claims with similar sentiment before -- remember, he once said women would let men "grab 'em by the p***y" so long as they're famous.

Donald's team isn't denying his comments in the book -- though they have said Trump barely remembers interacting with him and claimed he's a "loser" too focused on the Republican nominee.

Trump's 'Apprentice' comments are pretty tame when compared with other quotes in the book ... including a part where he called Taylor Swift "unusually beautiful"-- totally objectifying her.

TMZ Studios

Like we said, the book's out now ... and, we'll have to see if its good ratings have any effect on the Donald.

Click here for info about our online advertising practices.