wim's answer is the right one for your question, but a more generalized approach can be used in other situations. This approach is:
Instead of printing the separator after each item and trying to suppress the last one, print the separator before each item and suppress the first one.
This is simpler because it doesn't require being able to detect the last item being printed. Instead you set the separator to empty before entering the loop, and then after printing, change the separator to comma. (In the example below, I use string formatting; same idea.)
fmt = "%s"
for i in result:
print(fmt % i, end="")
fmt = ",%s"