with open('filename', 'rb') as f: x = pickle.load(f)
with open('filename', 'a') as f: pickle.dump(data, f)
objects = [] with (open("myfile", "rb")) as openfile: while True: try: objects.append(pickle.load(openfile)) except EOFError: break