def infer_format ( filename : str ) -> str : _ , ext = os . path . splitext ( filename ) return ext
python get a specific format file name
Return extension identifying format of given filename
def infer_format(filename:str) -> str:
    """Return extension identifying format of given filename"""
    _, ext = os.path.splitext(filename)
    return ext