s = "317"
#s = s.encode("utf8")
s = hex(int(s))
print(s)
s = int(s, 16)
str2 = struct.pack('>i', s)
#print(s, len(s))
print(str2)
2022-06-21 11:45:36
s = "317"
#s = s.encode("utf8")
s = hex(int(s))
print(s)
s = int(s, 16)
str2 = struct.pack('>i', s)
#print(s, len(s))
print(str2)