📜  临时变量 python 代码示例

📅  最后修改于: 2022-03-11 14:46:30.631000             🧑  作者: Mango

代码示例1
c = input(" ")
temp = {}
output = " "
for x in c:
    if x in temp:
        temp[x] = temp[x] + 1
    else:
        temp[x] = 1
for key, value in temp.items():
    output += str(value) + str(key)
print(output)