Could it be more simplified?


#1



just perfectly solved. :slight_smile:


check_bit4 = lambda input:{0b1000:'on', 0b0000:'off'}[0b1000&input]


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.