Answers for "_pickle.UnpicklingError: the STRING opcode argument must be quoted python"

0

_pickle.UnpicklingError: the STRING opcode argument must be quoted python

original = "word_data.pkl"
destination = "word_data_win10.pkl"

content = ''
outsize = 0
with open(original, 'rb') as infile:
    
    content = infile.read()
with open(destination, 'wb') as output:
    
    for line in content.splitlines():
        outsize += len(line) + 1
        output.write(line + str.encode('\n'))

print("Done. Saved %s bytes." % (len(content)-outsize))
Posted by: Guest on April-18-2021

Code answers related to "_pickle.UnpicklingError: the STRING opcode argument must be quoted python"

Python Answers by Framework

Browse Popular Code Answers by Language