1. 示例
message = input("tell me something, and I will repeat it back to you: ")
print(message)
1.1 提示 - prompt
prompt = "If you tell us who you are, we can personalize the messages you see."
prompt += "\nWhat is your first name? "
name = input(prompt)
print(name)
1.2 输入数据类型转换 int()
age = input("How old are you? ")
age # 此时的age是字符串'21'
age = int(age) # 将age转为数值
age >= 18
标签:prompt,函数,python,age,int,input,message,name
From: https://www.cnblogs.com/route/p/17536870.html