Write an IPv6 parser. Example input 1234:abcd:0000:0000:0102:0000:00... should produce a byte array ending [..., 0, 0, 192, 128, 0, 1].
Asked in the onsite round 1 stage. The sample address and the tail of the expected byte array are quoted in the post; the middle is cut off by the points wall.
Implement def ipv6_to_bytes(address):. The input is a valid IPv6 address using hexadecimal groups and optional :: compression. Return a list of exactly 16 integers in network byte order, with values from 0 through 255.
::.:: appears in the input.def ipv6_to_bytes(address):