Extract Elements From List Python Functions