print("a = {:#04x} = {:#010b}".format(a,d))

ValueError: Unknown format code 'x' for object of type 'str'


위에껀 오류고



a,b=input("input two hexadecimal numbers (예 : 0xA3 0x3A):").split()

c=int(a,base=16)

d=bin(c)

e=int(b,base=16)

f=bin(e)

print("a = {:#04x} = {:#010b}".format(a,d))

print("b = {:#04x} = {:#010b}".format(b,e))

print("a&b = {:#04x} = {:#010b}".format(c&e,c&e))

print("a|b = {:#04x} = {:#010b}".format(c|e,c|e))

print("a^b = {:#04x} = {:#010b}".format(c^e,c^e))

이게 내가 짠 코든데 어디가 잘못된거야 형들?