目录
上次我们讲解了函数print,今天我们来讲它的“好兄弟”input!
上次我们讲解了函数print,今天我们来讲它的“好兄弟”input!
讲解
1.input与变量
input在python中很有用,常用于在运行中手动对一个变量进行赋值,随后根据这个已被赋值的变量做出程序。在运行中input函数让你输入时点击IDLE窗口关闭便会提示“Your program is still running!”的提示,提示您必须输入一个字符串或数字才能关闭。
2.input与提示语
input可以加中英文提示语,可以提示如“Please enter a number:”。
a=input('Please