I came with a solution myself just After i posted the question. I created a string variable where by I held including strings to by using a comma and if the loop did its last operate, I designed an if statement not to add a comma to my variable (exactly https://alexislhlwe.uzblog.net/the-smart-trick-of-pm-svanidhi-yojana-that-nobody-is-discussing-43881218