Python Forum

Full Version: Type Error or Value Error?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
print(int("100.0"))
it is type error, how is it value error?
Execute the statement and see what exception pops up.
@deanhystad I saw that it says value error but I feel that for whatever value of the float, it will give the error and not just some of the values, so it should be type error?
int(arg) accepts strings as an argument, so it is not going to be a type error, no matter what is contained in the string. int(list) is a type error because list is not a valid argument type.