Solution (source code)

= Solution

Use the characterization by continuous maps to the discrete two-point space. Let $A=\bigcup_iA_i$ and let $f:A\to\{0,1\}$ be continuous. Its restriction to each connected $A_i$ is constant. Since $A_i\cap A_j\neq\varnothing$, those two constants agree for every pair $i,j$. Hence $f$ is constant on their union. Thus \b[the union is connected]. If the indexing set is empty, the union is empty and is connected directly.