I want to print the result output in the form of separated by a comma but i am getting a comma in last value also so how can i remove that.
import math
d = input().split(',')
d = [int(i) for i in d]
c=50
h=30
result=[]
for i in d:
q=int(round(math.sqrt((2*c*i)/h)))
result.append(q)
for i in result:
print(i, end=",")
here is an example of input i give and output i get
input : 10,20,30,40
output : 6,8,10,12,
how can i avoid getting that last comma