What is the output of the following Python code snippet?
try:
'1'
Correct answer
B. TypeError
6 views
B. TypeError
6 views
Ordering comparison between str and int raises TypeError in Python 3.
Asked in: Python Interview Output Prediction
https://docs.python.org/3/reference/datamodel.htmlNot sure why the answer is B? Ask here and get an explanation.