Python Define Function With List Input