I am looking at the following SHA256 pseudocode on wikipedia.
Specifically, I am looking at the following section.
//Initialize variables //(first 32 bits
Python can can display the exact IEEE 754 floating point data as a hexadecimal value. It includes the implied leading 1, the mantissa in hex and the exponent value:
>>> math.sqrt(2).hex() '0x1.6a09e667f3bcdp+0'
Slice as needed, for example:
>>> '0x'+math.sqrt(2).hex().split('.')[1][:8] '0x6a09e667'