Python定义函数怎么输出"% int",114514

我定义完运行的时候只能输出b的type

def printf(b):
    b=1.1
    c=type(b)
    b = bytes(b)
    c = bytes(c)
    c=c.replace("'","")
    c=c.replace("'","")
    c=c.replace("<type","")
    c=c.replace(">","")
    print('"%'+c+'",'+b)
    return b

a=114514
printf(a)

a = 114514
print("%d"%a)

常见的格式化符号如下:
%s 通过str()字符串转换来格式化
%u 无符号的十进制整数
%d 有符号的十进制整数
%o 八进制整数
%x 十六进制整数,小写字母
%X 十六进制整数,大写字母
%e 浮点数字(科学计数法)
%E 浮点数字(科学计数法,用E代替e)
%f 浮点实数
%g 浮点数字(根据值的大小采用%e或%f)
%G 浮点数字(类似于%g)

如果你是要将 b 转换成 int 的话
直接 int(b) 就好了