Absolutely. It is also why I will never understand why it is considered a virtue (especially in the maths and physics community) to set assignments without exemplary solution. I'm not asking to give this exemplary solution to students right away, but it should definitely exist and be given when students have shown honest effort and especially to weaker students that are struggling.
Instead the "left as an exercise to the reader" mentality is celebrated when in reality - in my opinion - it is almost always just a convenient excuse for the laziness of the professor at the expense of their students.