【Python 系列】Python3 获取控制台输入
highlight pytho color and input tro print light col """
接收控制台的输入
How old are you?
18
How tall are you ?
180
How much do you weigh?
50
So ,you are '18' old,'180' tall and '50' heavy,
python3的控制台输入函数时input();
"""print("How old are you?");
age = input();
print("How tall are you ?");
height = input();
print("How much do you weigh?");
weight = input();
print("So ,you are %r old,%r tall and %r heavy," % (age, height, weight));
来源: http://www.bubuko.com/infodetail-2456868.html