unpack python code example
Example 1: python Unpacking
# unpacking values for even numbers in list comprehension
x, y, z = (i*i+i for i in range(6) if i%2==0)
x, y, z
Example 2: python struct pack
import struct
var = struct.pack('hhl', 5, 10, 15)
print(var)
print(struct.unpack('hhl', var))