Is there a built in function in python tha can convert numbers like 5.76869 into binary?
I know how to do it by creating a function myself and bin only deals with integers
Is there a built in function in python tha can convert numbers like 5.76869 into binary?
I know how to do it by creating a function myself and bin only deals with integers
In Python, we can simply use the bin () function to convert from a decimal value to its corresponding binary value. The bin () takes a value as its argument and returns a binary equivalent. Note bin () return binary value with the prefix 0b, so depending on the use-case, formatting should be done to remove 0b.