"I'm sure the Republicans are enjoying Mr. Trump's dominance in their primary," the president joked.
"Anything that makes them look less crazy," Stewart quipped in return.
The president sat down with Stewart one final time before the late-night comedian steps down from his post in August -- a point on which the commander in chief gave Stewart a hard time.
"It's being challenged in the courts," the president jokingly added following laughter from the audience.
Stewart also asked the president about his relationship with the media.
The president admitted that there are "some that get on my nerves more than others" but that his main concern is not over the media being too tough or unfair. Instead, he said, he sees a challenge in getting the media to focus on the big issues of the day.
"It gets distracted by shiny objects," Obama said of the media. "Part of that is just the changing nature of technology. It's hard to do an hour-long special on 'The Other America,' let's say, or some of the other classic documentaries done a long time ago," Obama said. "On big tough issues sometimes it's hard to get entire nation's attention, but part of my job and part of the job of the White House is, how do we adapt to the new environment?"
The president was also reflective of his accomplishments as president but conceded that there are some issues he hasn't fully tackled.
"One of the things I'm proud of, and this is not just me, is that we have looked at a whole slew of problems when we came into office and we said, 'where can we advance the ball down the field each and every time across the board?' And we don't always score a touchdown every time, but we move the ball forward," Obama said.