input: Write a python function to edit a string such that only the first two characters remain the same and all other characters are replaced by '*'.
  assert edit_str("hello") == "he***"
  assert edit_str("world") == "wo***"
  assert edit_str("a") == "a"
  assert edit_str("ab") == "ab"
  assert edit_str("abc") == "ab*"
output: def edit_str(s):
      if len(s) <= 2:
          return s
      return s[:2] + '*' * (len(s) - 2)