Even though my statement said enter a number, in particular, raw input here simply takes in a set of characters and treats it as a string.
即使我的陈述说的是应该输入一个数字,实际上,这里的原始输入会被当做一个字符,的集合来提取并被当做一个字符串来对待。
So the take away is that if the user actually gives me two or three or four or whatever, this is this expression "is n less than 1" is going to evaluate to false if it's actually two or three or four or whatever.
所以先不管用户实际上给我,3,4还是其他数,这个表达式,“是否n小于1“将被评估为错误的,如果输入额是2,3,4或其它的数。
应用推荐