<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def endswith_strip(s, endswith='.txt', ignorecase=True):
 """ Strip a suffix from the end of a string 'http://TotalGood' 'http://TotalGood.com' """

    if ignorecase:
        if s.lower().endswith(endswith.lower()):
            return s[:-len(endswith)]
    else:
        if s.endswith(endswith):
            return s[:-len(endswith)]
    return s