input: Write a function to reverse and capitalize a string.
  assert reverse_and_capitalize("hello world") == "Dlrow olleh"
  assert reverse_and_capitalize("python") == "Nohtyp"
  assert reverse_and_capitalize("a") == "A"
output: def reverse_and_capitalize(s):
      return s[::-1].capitalize()