I ended up writing an email to the principal with the teacher cc'ed saying the good things that the teacher did that we really appreciated and how much DS enjoyed the school. Both the principal and teacher wrote back thanking me and saying they really appreciated the feedback. I think that goes much further than something hastily picked up at the store. But only if the teacher is good enough to do that.

DD had a long-term sub for a couple months that was horrid enough I didn't feel the need to do anything. Her regular classroom teacher came in to say goodbye and DD picked flowers from our yard and also wrote a thank you note. I think it's the thought that counts, not the actual "stuff". If there are two teachers at the same school and you give one something and not the other, that could be awkward. In that case, maybe just an thank you note or email for the good one.