Another technique:
Depending on the line, one can mask it with an appropriate shape and then animate the mask to reveal the line.
A tip: drop the opacity of the mask while keyframing it so you can see the line under it as you work.
You can also rotate the mask so the end of the line stays ‘square’.
Personally, I think the motion path and a small circle previously mentioned is the best approach and can handle any line shape.