📜  int 对象不可下标 - Python 代码示例

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

代码示例1
name1 = input("What's your name?: ")
age1 = input("How old are you?: ")
x = int(age1)
twentyone = 21 - x
print("Hi, " + name1 + " you will be 21 in:", twentyone, "years.")