I am getting this error "TypeError: 'str' object is not callable" when i am trying to convert a str to float inorder to do summation.
# To Find sum of no. s seperated by commas in a string
t=''
y=''
z=""
s = "1.23,2.4,3.123"
for x in s:
if x != ',':
y += x
else:
t = z
z = y
y = ''
print("y=",y,"z=",z,"t=",t)
y = float(y)
z = float(z)
t = float(t)
print("Sum is =",y+z+t)
Screenshot of the error occurring when i run the code