Suppose the restrictions of a function $f$ to sets $E_1, ..., E_n$ are continuous. Then is the restriction of $f$ to $\cup_{i=1}^{N} E_i$ continuous? What about to $\cup_{i=1}^{\infty} E_i$?
It seems like common sense but I'm not sure if it's true, especially for the infinite case.
Thanks!