def strip_tags(body):
    """Delete the first and last line if they full of hashtags.
    Also strip every line of unnecessary whitespaces."""
    lines = body.split('\n')

    # remove last line if full of hashtags
    for word in lines[-1].split():
        if word[0] != '#':
            break
    else:
        del lines[-1]

    # remove first line if full of hashtags
    for word in lines[0].split():
        if word[0] != '#':
            break
    else:
        del lines[0]

    # strip spaces from every line
    lines = [line.strip() for line in lines]

    body = '\n'.join(lines)
    return body