human
Give me a the Python code you requested given the following:
Write a python function to remove first and last occurrence of a given character from the string. Here is a solution in Python:
assistant
#Here is the Python code you requested.
 def remove_Occ(s,ch): 
    for i in range(len(s)): 
        if (s[i] == ch): 
            s = s[0 : i] + s[i + 1:] 
            break
    for i in range(len(s) - 1,-1,-1):  
        if (s[i] == ch): 
            s = s[0 : i] + s[i + 1:] 
            break
    return s