Python Function Output Parameter From Data