QuestionQ34

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output from the following code?

Question Image

Explanation

In a Python string literal, \\ represents two literal backslash characters because each pair of backslashes produces one backslash. Therefore, len(x) evaluates to 2.

Community Discussion

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