def get_file_ext(filename):
    root,ext = os.path.splitext(filename)
    if ext.lower() in ['.gz', '.bz2', '.xz']:
        other = os.path.splitext(root)[1]
        if other.lower() in ['.tar']:
            # Make sure we bundle file.tar.gz as 'tar.gz'
            return (other[1:] + ext).lower()

    return ext[1:].lower()
Make a pie chart
dataset/ETHPy150Open gosquadron/squadron/squadron/template.py/get_file_ext--crossover with--dataset/ETHPy150Open LargePanda/LearnPy/learnpy/tools/TweetSentiment.py/TweetSentiment.make_pie