I came with a solution myself just when I posted the question. I designed a string variable in which I retained adding strings to that has a comma and when the loop did its final operate, I created an if statement not to insert a comma to my variable (the https://sure-here-s-the-list-with64465.wikihearsay.com/2884737/5_simple_statements_about_pradhan_mantri_suraksha_bima_yojana_pmsby_explained