def text2html(text):
    """ Convert a text in a certain format to html.
    Examples:
    >>> text2html('Hello, my name is /bJane/b')
    'Hello, my name is <b>Jane</b>'
    >>> text2html('/iHello/i, my /uname/u is /b/i/uJane/u/i/b')
    '<i>Hello</i>, my <u>name</u> is <b><i><u>Jane</u></i></b>'
    """
elem = []

def to_tag(match_obj):
    match = match_obj.group(0)
Как заменить пары токенов в строке?