I’m reading a value from a General Purpose IO (GPIO) configured as Input and it returns a string that is either 0 or 1. I see two easy ways to convertiing it to boolean:
bool(int(input_value))
or
not not int(input_value)
Which is most Pythonic? Are there more Pythonic ways then the ones presented above?