(CNN) President Obama gave some advice on running for president to Kanye West on Saturday while speaking at a DNC fundraiser in San Francisco where the rapper performed.

"A little bit later you're going to hear from a guy who I hear has been talking about launching a potential political career," Obama said to the crowd of about 1,300 supporters who paid between $250 and $10,000 a person to attend.

"You may have heard of this, Kanye is thinking about running for Speaker of the House. It couldn't get any stranger...But in case Kanye is serious about this whole POTUS thing -- or as he calls it 'peezy' [West's nickname is Yeezy] -- I do have advice for him."

Obama said that as president you spend a lot of time "dealing with some strange characters who behave like they're on a reality TV show" -- a clear reference to West's wife Kim Kardashian West and the "Keeping Up With the Kardasahians" reality show empire.

The President also joked that West may need to do better at keeping on message, saying the rapper can't say things like "you have a beautiful dark twisted fantasy," which is the name of West's 2010 album.

Read More