$X$ is a connected space and $Y$ is a discrete space prove that the two maps $f,g\colon X\rightarrow Y$ are homotopic if and only if $f=g$.
I am trying to solve few problems in algebraic topology, but I don't have deep knowledge in the subject. I guess the reverse direction of proof is trivial, but I am struck with the forward direction. Does the proof include stuff like "for continuous image of connected set to be discrete the map should be constant"? I am a bit confused with the problem. Can someone help me out?