Assigning python scripts to game objects?

Edit: Just realized I posted this in the wrong forum. Sorry!