Sep-22-2018, 06:16 PM
When I am writing bytes to a file using this:
string1 = "abc123test" f = open(filewrite, "wb") f.write(string1) f.close()it gives me this error:
Error: f.write(string1)
TypeError: a bytes-like object is required, not 'str'
can someone help me on this?