python自己整理的笔记:将数字转换为列表&将列表反向转换为数字

1:将数字转换为列表

list(map(int,str(123)))

结果:
请添加图片描述

2.将列表反向转换为数字

int(''.join(list(map(str,[1,2,3]))))

结果:
请添加图片描述