Q:

Has Lindsey Graham ever explained his flip-flopping opinion of Donald Trump?

Late-night talk shows frequently show montages of Senator Lindsey Graham expressing extremely negative opinions of Donald Trump while Trump was campaigning for the Republican nomination (he called him a "kook", "racist", "religious bigot", "unfit for office", just to name a few), to constrast his past opinions with his sycophantic support of Trump since he took office.
Has Graham ever addressed this complete about-face? I don't think it can be explained simply as respect for the office of POTUS as opposed to the person himself, because Graham was not so respectful of Obama when he was President.
It seems likely to me that it's simply because Trump is the leader of the GOP in his role as President, so he has to get behind him like most of the rest of the party. Has he ever admitted something like this? But most other party members were not so vehemently and publicly opposed to Trump before he took office, so it seems like he has more explaining to do than others. Would it be political suicide to admit that his reason is so shallow?

A:

There's not much to unravel here, from the NYTM interview, Graham was quite open about trying to stay relevant, be influential in policy matters, as well as be re-elected in the Trump era.

Mark Leibovich (To Lindsey Graham): You seem a little sick and tired of the “what’s happening to Lindsey Graham?” question.
Lindsey Graham: Yeah. It’s just like, yeah, O.K. Nothing, from my point of view. If you know anything about me, it’d be odd for me not to do this.
Mark Leibovich: Now what is “this“? To work with him, or —
Lindsey Graham: This is to try to be relevant. [...] To the ends, to the objectives that I want. [...] That it is about outcomes, that I’ve got an opportunity up here working with the president to get some outcomes that could be really good for the country and I think, from my point of view, good for the world.
Mark Leibovich: Being relevant to Donald Trump, being in his orbit, helps me influence the things that I think are good for our country. And then —
Mark Leibovich (To Lindsey Graham): And good for your re-election.
Mark Leibovich: I cynically said, and also good for Lindsey Graham’s re-election.
Lindsey Graham: Yeah. I mean, if you don’t want to get re-elected, you’re in the wrong business. [...]
Michael Barbaro: Over the weekend, Lindsey Graham spoke at the annual gathering of the Conservative Political Action Conference, where he once again praised President Trump and boasted about their close relationship.
Lindsey Graham: And I couldn’t be more proud of the fact that he talks to me, and he asks my opinion. And we’ve got a lot in common now. I like him, and he likes him. [LAUGHTER]

And more paraphrasing with snippet quotes:

An outcome of particular interest to Graham, at the moment, is getting re-elected to a fourth Senate term in South Carolina, where Trump owns commanding approval numbers, especially among the hard-core Republicans who in the past questioned Graham’s devotion to their conservative cause. Sure, Graham allowed, you might emphasize some things more than others when you’re trying to appeal to the party base. “You just showcase your issues, right?” he said. During his last re-election campaign, in 2014, Graham asserted his base bona fides by railing against President Barack Obama’s White House “scumbags” and warning that “the world is literally about to blow up.” He has always been conservative, he emphasized. “But in our business, you’re not defined by the 80 percent agreement. You’re defined by the 20 percent” that the base might object to. (His relatively liberal position on immigration once led Rush Limbaugh to dub him “Lindsey Grahamnesty.”) [...]
“Relevance,” Graham said, returning to the word as if it were a mantra. “That was John McCain’s word.”
When I asked Graham whether he ever worried about being seen as a toady to Trump, his voice assumed a slightly clipped edge. “No, here’s what I worry about,” he told me. “That we’re going to get it wrong in Syria and Afghanistan. I worry more about the policy stuff. And I have more influence than I’ve ever had.” [...]
Graham says he has achieved graduating levels of relevance with Trump. “I went from, ‘O.K., he’s president’ to ‘How can I get to be in his orbit?’?”— “orbit” is another favorite Graham word — “to ‘How can I have a say in what’s going to happen today, tomorrow and next week?’?” he told me.
I asked Graham if he considered himself part of the wider Trump orbit or the more select one. “Well, I’m getting into the smaller orbit now,” he said. I asked him who else was in that precinct of the Trump solar system. He mentioned Melania, Ivanka, Jared. “He’s got a bunch of old friends that still have a say, New York types,” Graham said. “But the circle 
  is small.” [...]
At the end of our second interview, in mid-February, I asked Graham if he trusted Trump. Graham’s eyes seemed to bulge for a split second. He sat back in his chair and paused. “That’s a good question,” he told me.
He paused some more. “Do I trust him?” he said at last. “I trust the president to want to be successful,” he said. The president’s mercurialness, he acknowledged, could be a problem. “He will change his mind in a New York minute,” Graham said. “You never know where he’ll be. I mean, I woke up one day, and we’re pulling out of Syria.”
But to this point, he and Trump have been able to work together. “He’s asked me to do some things, and I’ve asked him to do some things in return,” Graham said. Then, as if looking wistfully over his shoulder at his old maverick-sidekick days, he offered, “There’s sort of a Don Quixote aspect to this.” It was an odd thing for a man who was espousing the median Republican-circa-2019 position to say.
“At the intersection of all this theater is that he wants to be a successful president,” Graham said of Trump, “and I want him to be successful under terms that I think are good for the country.” Understood, but unspoken, was that these terms would also be good for Lindsey Graham.

