#可以直接将raw_input()的结果赋给response变量,而且()里的内容可以直接输入,无需之前的例子中先print一个提示,再用raw_input()让大家输入#
response = raw_input("how may students are in your class") numberofstudents=int(response) print "there are", numberofstudents
本文共 266 字,大约阅读时间需要 1 分钟。
#可以直接将raw_input()的结果赋给response变量,而且()里的内容可以直接输入,无需之前的例子中先print一个提示,再用raw_input()让大家输入#
response = raw_input("how may students are in your class") numberofstudents=int(response) print "there are", numberofstudents
转载于:https://blog.51cto.com/huzhongliang/1890107