Python Function Inside Array Initialization