Code: Alles auswählen
file_in = open('datei.bin','rb')
file_out = open('dateineu.bin','wb')
a = file_in.read()
file_out.write(a[::-1])
file_in.close()
file_out.close()
Tom
Code: Alles auswählen
file_in = open('datei.bin','rb')
file_out = open('dateineu.bin','wb')
a = file_in.read()
file_out.write(a[::-1])
file_in.close()
file_out.close()
Code: Alles auswählen
with open('datei.bin', 'rb') as in_file:
with open('dateineu.bin', 'wb') as out_file:
out_file.write(in_file.read()[::-1])