Because d is a string?
Code:
a=5b=bin(a)print(b,type(b))c=b[-1:]d=b[-2:-1]e=b[-3:-2]print(c,bool(c))print(d,type(d),bool(int(d)))print(e,bool(e))
Statistics: Posted by rpiMike — Thu Dec 05, 2024 4:51 pm