你这不是已经转成list了吗
使用列表解析,一行即可:
l = [[], ['9', '8'], ['9', '5'], ['9', '2']] res = [int(x[0]+x[1]) for x in l if len(x)!=0] print(res)
如对你有帮助,请点击一下采纳按钮。