print(bin(42)) print(bin(42)[2:]) #[2:] 인덱스 2부터 끝까지
0b101010 101010
print(format(42, 'b')) print(format(42, '10b')) #너비 지정, ' ' 채움 print(format(42, '010b')) #너비 지정, '0' 채움
101010 101010 0000101010