📌  相关文章
📜  在python代码示例中添加数字的第一位和最后一位的程序

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

代码示例1
n = int(input("Enter any number : "))
number = str(n)
first = int(number[0])
last = int(number[-1])
print(f"sum of {first} and {last} is : ",sum)