String function to strip the last comma March 20, 2023 by Tarik Just use rstrip(). result = your_string.rstrip(',')