import pickle f = open('serial', 'r') l = pickle.load(f) f.close() print l