I have an array of float that I need to send over TCP/IP, the protocol is text based so basically I cannot send directly binary.
What Im trying to do is to convert the Float values to 4 Ord
So ex:
“”” Initialize the float “””
a = 3.14159
“”” Final result should be a string containing the 4 Ord, 1 for each byte the of the float value: “””
b = “\123\23\22\245”
Anybody can help me with this?
TIA!
not sure where you arrived at
"\123\23\22\245"If you wish to convert a list of floats
will give you a single string. No need for an explicit loop and join