input: Write a python function to replace placeholders in a string with their corresponding values from a dictionary.
  assert reformat_string("Hello {name}, it's {time} to go", {"name": "John", "time": "2pm"}) == "Hello John, it's 2pm to go"
  assert reformat_string("The {animal} jumped over the {object}", {"animal": "dog", "object": "moon"}) == "The dog jumped over the moon"
  assert reformat_string("{greeting}, {name}!", {"greeting": "Hi", "name": "Alice"}) == "Hi, Alice!"
output: def reformat_string(template, replacements):
      for key, value in replacements.items():
          template = template.replace(f'{{{key}}}', value)
      return template