获取用户输入

获取用户输入函数:input

举例1:input("The meaning of life:")

屏幕会输出:The meaning of life:

等待你的输入...

举例2:x=input("x:")

          y=input("y:")

          print (x*y)

最终输出结果为:x:..

                       y: ..

                       x乘以y的结果

 加一例:

name=raw_input("what is your name?")
print("hello,"+name+"!")

raw_input("press enter:")    #可以看到结果后,按回车键结束

注释行开头使用:#

原文地址:https://www.cnblogs.com/buzhidaojiaoshenmoleya/p/5763073.html