Skip to content

Instantly share code, notes, and snippets.

@Kalbra
Created November 22, 2020 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kalbra/ad780cde9e1b82563e707ccc681c2877 to your computer and use it in GitHub Desktop.
Save Kalbra/ad780cde9e1b82563e707ccc681c2877 to your computer and use it in GitHub Desktop.
Converts little endian hexadezimal into big endian and the other way round
hex_reverse = ""
for h in [hex[i:i + 2] for i in range(0, len(hex), 2)][::-1]:
hex_reverse += h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment