在python中获取变量之和

在python中获取变量之和,python,variables,Python,Variables,所以我有下面的代码,出于某种原因,两个变量“大”和“小”似乎不相加,我不知道为什么。请帮帮我 n = int(input("number:" )) x = map(int, str(n)) x = [int(x) for x in tal] x.sort(reverse=True) large = "".join(map(str, x)) x.sort() small = "".join(map(str, x)) int(large) int(small) large + small=

所以我有下面的代码,出于某种原因,两个变量“大”和“小”似乎不相加,我不知道为什么。请帮帮我

n = int(input("number:" ))

x = map(int, str(n))
x = [int(x) for x in tal]

x.sort(reverse=True)
large = "".join(map(str, x))

x.sort()
small = "".join(map(str, x))

int(large)
int(small)

large + small=y

print(y)

它应该是:
y=large+small

它应该是:
y=large+small
改变

int(large)
int(small)

large + small=y

改变

应该是

y = large + small
应该是

y = large + small
更改为:

y = large+small
顺便说一句,什么是好未来?

更改为:

y = large+small

什么是好未来,顺便说一下?

我想应该是
y=large+small
?什么是
tal
以及为什么要使用
int(str(int(n))
您的程序中有很多错误您在列表理解中使用的变量
tal
是什么?为什么要编写此
int(大)int(小)
?重点是什么?我想应该是
y=large+small
?什么是
tal
以及为什么要使用
int(str(int(n))
您的程序中有很多错误您在列表理解中使用的变量
tal
是什么?为什么要编写此
int(大)int(小)
?重点是什么?