Is there any operator which its spectrum corresponding to a compact set? we know that for each operator $T$ the spectrum $\sigma(T)$ is compact. Is the converse true I mean if we have a compact set $K\neq\emptyset$, is there any operator $T$ such that $\sigma(T)=K$? 
I am searching for counterexample.
thanks

In general, if you do not specify the space, the answer is yes. Take $L^2(\mathbb{R})$ and let $f$ be a measurable function such that its range is exactly your compact set, i.e. $f(\mathbb{R})=K$. Then the spectrum of the multiplication operator with $f$ equals your prescribed compact set.
The multiplication operator with $f$ is defined as $M_f g := fg$ for all $g\in L^2(\mathbb{R})$. In this case, $\sigma(M_f)=K$.
ADDED:
The spectrum of the multiplication operator is calculated here in this question.
