str转int
字符串str转换成int: int_value = int(str_value)
int转str
1、str函数
int转换成字符串str: str_value = str(int_value)
2、fromat函数
str_value = “{}”.format(int_value)
3、补齐,例如1专为0001
str_value ="{:0>4d}".format(int_value)
fromat函数参考fromat函数用法参考:
https://blog.csdn.net/cw_huang/article/details/119456112