Python Function Passing Variables To Sql