Better way to avoid duplicated printing?

Thank you for yours reply and advise.

I am trying it the coding..

will update here again with my finding!

Thank you so much!