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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
