QuestionQ21

Python Basics

What is displayed when the following commands are entered in Python interactive mode?

Question Image

Explanation

Python does not allow the + operator to concatenate an integer with a string. The expression a + " " + "c" therefore raises a TypeError before any output is printed.

Community Discussion

No comments yet. Be the first to start the discussion!