input: Write a python function to remove the nth occurrence of a substring from a given string.
  assert remove_nth_occurrence("this is a test string", "is", 1) == "th a test string"
  assert remove_nth_occurrence("this is a test string is", "is", 2) == "this is a test string "
  assert remove_nth_occurrence("abcabcabc", "abc", 3) == "abcabc"
  assert remove_nth_occurrence("hello world", "o", 1) == "hell world"
output: def remove_nth_occurrence(s, sub, n):
      start = -1
      for _ in range(n):
          start = s.find(sub, start + 1)
          if start == -1:
              return s
      return s[:start] + s[start + len(sub):]