I came across this new question 🔗 and decided to answer it. I had two ways to solve OP's problem so I decided to post two separate answers. I was then met by the dialog:
Are you sure you want to add another answer?
You could use the edit link to refine and improve your existing answer, instead.
And this got me thinking; is it better to have one long answer presenting different solutions than providing multiple answers, one for each solution? I would argue that several answers is better since one of the solutions might be correct and the others not, and if you have one long answer it's difficult to know which solution was correct.
Should we prefer one answer presenting several solutions or one answer for each solution?