Skip to content
Advertisement

Flipping a binary in a string

I am new to python and coding in general. So what I am trying to achieve is to flip each bit in a binary string (for eg. if I input ‘110’ the output should be ‘001’). I specifically need to use the while loop and I need to define it as a function. Here is what I’ve tried so far:

Read a TSV file from a remote server

I have this function which returns the path to the file I need to read Later on, I am trying to open the file db_file holds one of the paths above. When I execute the script I get this error: I have checked the files names and the paths they all exist and in the right location. I have tried

Advertisement