from bs4 import BeautifulSoup


def destroy_tags(soup:BeautifulSoup, *args:str) -> BeautifulSoup:
    """
    Suppress tag and tag content for tags that the kindle does not support.
    By default, removes <script> and <style>.

    Args: 
        soup (BeautifulSoup): html content with unsupported tags
        args (str): name of the tags to be destroyed
    Returns: 
        soup (BeautifulSoup): original soup with selected tags destroyed
    Usage: 
        destroy_tag(soup, 'code', 'script')
    Modules: 
        bs4 (BeautifulSoup)
    """
    # always destroy these tags:
    tagz = ['script', 'style']
    # add tags to list if found in args:
    if args:
        tagz.extend(args)
    for tag in tagz:
        for item in soup.find_all(tag):
            item.extract(strip=True)
    return soup