初学python,有个小问题,麻烦大侠们帮忙,谢了
1, b=int(3.3)print b 这个能够正确输出3
2,b=raw_input()
a=int(b)
print a 假如输入3.3,也能够正确输入3.3
3,a=int(raw_input())
print a 假如输入3.3却提示错误
Traceback (most recent call last):
File "C:/Python26/1.py", line 1, in <module>
a=int(raw_input())
ValueError: invalid literal for int() with base 10: '3.3'
请问大侠们,第三种情况为何错误呢?