def pickle_load ( fname ) : assert type ( fname ) is str and os . path . exists ( fname ) print ( "loaded" , fname ) return pickle . load ( open ( fname , "rb" ) )
how to opena and check the contents of file in python using load and pickle
return the contents of a pickle file
def pickle_load(fname):
    """return the contents of a pickle file"""
    assert type(fname) is str and os.path.exists(fname)
    print("loaded",fname)
    return pickle.load(open(fname,"rb"))