LOS ANGELES, Calif. -- President Barack Obama wrapped up his two-day visit to Southern California with an appearance on the "Tonight Show" on Tuesday.

The president got to experience the infamous Los Angeles traffic when his motorcade got stuck in a traffic jam on the 101 Freeway near Ventura Boulevard as he was on his way to NBC studios to tape his interview with Jay Leno.

People waited to catch a glimpse of the president outside the studios. It was Obama's second appearance on the show as president.

Leno asked Obama about the death of longtime Libyan dictator Moammar Gadhafi.

"Well, this is somebody who, for 40 years, has terrorized his country and supported terrorism," Obama said.

"He had an opportunity during the 'Arab Spring' to finally let loose of his grip on power and to peacefully transition into a democracy. We gave him ample opportunity, and he wouldn't do it."

Obama also spoke about his decision to withdraw all U.S. troops from Iraq, deadpanning surprise at Republican opposition.

"It's shocking that they opposed something I proposed," he quipped.

Of his GOP presidential rivals, Obama told Leno he's "going to wait until everybody is voted off the island."

"Once they narrow it down to one or two, I'll start paying attention," Obama said.

The president also joked about his impromptu stop at Roscoe's House of Chicken n' Waffles en route to a fundraiser on Monday.

"I was going to a fundraiser with Will Smith and Jada... and I didn't realize it was so close," he said. "So suddenly we pull up and my sleeves are rolled up and I've got a spot on my tie... chicken in my teeth."

"It was not elegant... but outstanding chicken," he quipped.

After his "Leno" appearance, the president boarded Air Force One and headed to San Francisco to wrap up his West Coast jaunt.

He attended a fundraiser at the W Hotel, with tickets starting at $5,000.