Python Function Define Input Cost