This might be a silly question, but I have seen examples of functions in $L^p-L^{\infty}$ such as this, but I cannot come up with an example of a function $f$ such that $f\in L^{\infty}-L^p$.
So, my question is, does such a function even exist? If yes, then can you give an example? If no, then prove that no such $f$ exists. Note that you're free to use any measure space.
If the measure space is finite, then no such thing exists.
If the measure space is infinite, then any nonzero constant function will be in $L^\infty\setminus L^p$ for finite $p$