Complement of zero set of holomorphic function is dense and connected This is exercise 1.1.8 of Huybrechts' Complex Geometry.
Problem: let $U$ be an open connected subset of $\mathbb{C}^n$. Let $f:U\rightarrow \mathbb{C}$ be a holomorphic function. Show that the complement of the zero set $U\setminus Z(f)$ is dense and connected.
For the density I have reasoned as follows: $Z(f)=f^{-1}(\{0\})$ which is closed. Thus $U\setminus Z(f)$ is open. For it to be dense as a subset of $U$ I need only construct sequences $\{x_n\}\subset U\setminus Z(f)$ converging to a fixed but arbitrary point in $Z(f)$. This would follow probably form the identity principle, but I have reasoned with Weierstrass Preparation Theorem: after a suitable change of coordinates, I can consider $f$ to be set at the origin, and there must be some coordinate $z_1$ such that $f(z_1,0,\dots,0)\not\equiv 0$. Near the origin I have a decomposition
$$
f = h \cdot p
$$
where $p$ is a Weierstrass polynomial in $z_1$ and $h(0,...,0)\neq 0$. Zeroes of a single-variable polynomial are necessarily isolated (since we assumed $f(z_1,*)$ is not trivial), so that immediately gives me a sequence.
For showing that $U\setminus Z(f)$ is connected, I have barely any idea. I suppose that I could use something like $Z(f)$ has at least codimension 1 in some sense, and that gives me 1 complex dimension = 2 real dimensions to carry out paths from "one side of $Z(f)$ to the other", loosely speaking.
I would appreciate any hint and correction on both these issues.
 A: You forgot to assume that $f$ is not identically zero. Here is one way to argue:
Step 1. I will start with some general topology observations. Let $X$ be a topological space and $A\subset X$ a subset. One says that $A$ does not locally separate $X$ if for every $x\in X$ there is a neighbourhood $W_x$ of $x$ in $X$ such that $W_x\setminus A$ is connected.
I will now assume, mostly for convenience, that $X$ is metrizable. (In the case of interest, $X$ will be an open subset of ${\mathbb C}^n$.)
Lemma. Suppose that $X$ is connected, $A\subset X$ is closed, $int(A)=\emptyset$ and $A$ does not locally separate $X$. Then $X\setminus A$ is connected.
Proof. Let $V$ be a connected component of $X\setminus A$. I claim that $cl_X(V)=X$. If not, then, by connectedness of $X$, there is a boundary point $x$ of $cl_X(V)$ in $X$, and, hence, a sequence
$x_i\in X\setminus cl(V)$ converging to $x$. Since $A$ is closed and has empty interior in $X$, the sequence $x_i$ can be chosen so that $x_i\notin A$ for each $i$. Let $W_x$ denote a neighborhood of $x$ such that
$W_x\setminus A$ is connected. Since $x$ is in the closure of $V$, the intersection $W_x\cap V\subset W_x\setminus A$ is also nonempty. Furthermore, for some $i$, $x_i$ is in $W_x\setminus A$. By the connectedness of $W_x\setminus A$, it follows that $x_i$ lies in the connected component $V$ of $X\setminus A$.  A contradiction.
Thus, $cl_X(V)=X$. Since $cl_X(V)\subset V \cup A$ (as $V$ is a connected component of $X\setminus A$), it follows that $X=V\cup A$, i.e.  $X\setminus A$ is connected. qed
I will now turn to your question.
Let $X$ be an open connected subset of  ${\mathbb C}^n$, $f: X\to {\mathbb C}$ a nonconstant holomorphic function, $A:= f^{-1}(0)$. I will be using the fact that $A$ has empty interior in $X$ (already proven).
Step 2. Now, prove that $A$ does not locally separate $X$. Namely, given $x\in X$, take $W_x$ to be an open ball  centered at $x$ and contained in $X$. Verify connectedness of $W_x\setminus A$ by looking at the intersections of complex lines $L$ with $W_x$: For each pair of distinct points $p, q$ in $W_x\setminus A$ take the complex line $L$ containing $p, q$. Then $f|_{L\cap X}$ is nonconstant, i.e. $L\cap A$ is a discrete subset of $L\cap X$. (I will leave it to you as an exercise.) From this, conclude path-connectedness of  $L\cap (W_x\setminus A)$ and, hence, path-connectedness of $W_x\setminus A$. (Again, an exercise.)


*Now, combine Lemma and and Step 2 to conclude that the zero-level set of a nonconstant holomorphic function does not separate the domain, as required.

