I am trying to remove everything between curly braces in a string, and trying to do that recursivesly.
And I am returning x here when the recursion is over, but
You never return anything if the if block succeeds. The return statement lies in the else block, and is only executed if everything else isn't. You want to return the value you get from the recursion.
if x.find('{', ind) != -1 and x.find('}', ind) != -1:
...
return doit(x, end+1)
else:
return x