```python
def remove_Occ(s, ch):
    """
    Removes the first and last occurrence of a given character from the string.
    """
    first = s.find(ch)
    last = s.rfind(ch)

    if first == -1:
        return s

    if first == last:
        return s[:first] + s[first + 1:]
    else:
        # Remove the last character first to not affect the index of the first one
        # if we were to do it sequentially on a mutable sequence.
        # With slicing, it's cleaner to build the new string from parts.
        return s[:first] + s[first + 1:last] + s[last + 1:]

```