I need some help in removing two sets of curly brackets with string.Right now it's only removing one set. I tired to use find and rfind to find the first and last occurence of the string index and using slice method to cut out the curly brackets but it can only remove one set of it.
It should work something like that
Input: {fefeef}this{feofeow}.4849
Output this.4849
Here is my code
def help_mmtf():
while True:
user_input = input("Filename?")
text_input = str(user_input)
if (text_input !=""):
word = text_input
index1 = word.find("{")
index2 = word.find("}")
print(index1)
print(index2)
index3 = word.rfind("{")
index4 = word.rfind("}")
print(index3)
print(index4)
splice_input = text_input[:index1] + text_input[index4+1:]
print(f'"{splice_input}"')
else:
break