Take debugging to a whole new level:

Given a string, remove every *single* bug.

This means you must remove all instances of the word 'bug' from within a given string, *unless* the word is plural ('bugs').

For example, given 'obugobugobuoobugsoo', you should return 'ooobuoobugsoo'.

Another example: given 'obbugugo', you should return 'obugo'.

Note that all characters will be lowercase.

Happy squishing!

Difficulty: introductory

Starter code:

def debug(s):
	

Solutions:
import re

def debug(s):
    return re.sub(r'bug(?!s)', '', s)

import re

def debug(string):
    return re.sub("bug(?!s)", "", string)

def debug(s):
    s=s.replace("bugs", "^")
    s=s.replace("bug", "")
    s=s.replace("^", "bugs")
    return s

def debug(s):
    return __import__('re').sub(r'bug(?!s)', '', s)

import re
def debug(s):
    return re.sub('bug(?!s)', '', s)

def debug(s):
    return s.replace("bugs", "bu_gs").replace("bug", "").replace("bu_gs", "bugs")

def debug (s):
    return s.replace('bugs', '####').replace('bug','').replace('####', 'bugs');

def debug(s):
  return s.replace("bugs", "b1u2g3s").replace("bug", "").replace("b1u2g3s", "bugs")

def debug(s):
    return 'bugs'.join(w.replace('bug', '') for w in s.split('bugs'))

def debug(s):
    result = s.replace("bugs", "&")
    result = result.replace("bug", "")
    result = result.replace("&", "bugs")
    return result