python中交换字节的有效方法我有一些长度为2*n的bytearray: a1 a2 b1 b2 c1 c2 我需要在每个2字节的单词中切换字节endian,并使: a2 a1 b2 b1 c2 c1 现在我使用了下一种方法, ...2024-07-07 已阅读: n次