The 54-year-old politician joked about the 'Bound 2' hitmaker's recent proclamations that he intends to run for office and suggested the rapper's marriage to 'Keeping Up With the Kardashians' star Kim Kardashian West would help him in his potential future career.

Speaking in San Francisco's Warfield Theater ahead of Kanye's performance at a Democratic National Committee (DNC) fundraiser, he quipped: "In a little while you are going to hear from a guy who is thinking about getting into politics.

"In case Kanye's serious about this whole POTUS thing, or as he calls it, Peezy, I do have advice for him;

"You've got to deal with strange characters who behave as if they are on a reality TV show. So you've got to be cool with that."

And in reference to Kanye's 2010 album 'My Beautiful Dark Twisted Fantasy', he added: "This is the second tip, saying that you have a beautiful, dark, twisted fantasy. That's what's known as 'off message' in politics, you can't something like that."

And Obama even poked fun at himself while questioning Kanye's chances of being voted into office.

He said: "Do you really think this country is going to elect a black guy from the south side of Chicago with a funny name to be President of the US? That is crazy! That's cray."