The pasting lemma says:
Let $X=A\cup B$, where $A$ and $B$ are closed in $X$. Let $f:A\to Y$ and $g:B\to Y$ be continuous. If $f(x)=g(x)$ for every $x\in A\cap B$, then $f$ and $g$ combine to give a continuous function $h:X\to Y$, defined by setting $h(x)=f(x)$ for $x\in A$ and $h(x)=g(x)$ if $x\in B$.
Let $A=[1,2]$ and $B=[3,4]$. Also, let $f([1,2])=1$ and $f([3,4])=2$. How is $f$ continuous on $[1,2]\cup [3,4]$?
Thanks in advance!