js代码改写py

This commit is contained in:
fengche
2026-01-30 17:47:21 +08:00
parent a482e4ea77
commit aad77378ab
20 changed files with 2649 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
def change_endian(hex_str: str) -> str:
# Convert hex string to bytes
buffer = bytes.fromhex(hex_str)
# Reverse the byte order
endian = buffer[::-1]
# Convert back to hex string
result = endian.hex()
return result
__all__ = ["change_endian"]