Advertisements
Advertisements
प्रश्न
When do we get a TypeError?
लघु उत्तरीय
Advertisements
उत्तर
A TypeError occurs when an operation or function is applied to an object of an inappropriate type.
Examples:
"2" + 3 # TypeError
len(10) # TypeError
3 + [1, 2] # TypeError
It can also occur when a function receives the wrong type or number of arguments.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
