import pickle gpu_data = [] with open("configuration.pkl", "rb") as openfile: while True: try: gpu_data = pickle.load(openfile) except EOFError: break print(gpu_data) # exp_data = [] # with (open("bayes_exp_data_6.pkl", "rb")) as openfile: # while True: # try: # exp_data = pickle.load(openfile) # except EOFError: # break