TypeError` ভুল টাইপের অবজেক্ট কম্বাইন করার সময় বা ভুল টাইপের অবজেক্ট দিয়ে ফাংশন কল করার সময় হয়।
উদাহরণ
import sys
try:
ny = 'Statue of Liberty'
my_list = [3, 4, 5, 8, 9]
print(my_list + ny)
except TypeError as e:
print(e)
print(sys.exc_type)
আউটপুট
can only concatenate list (not "str") to list <type 'exceptions.TypeError'>