QuestionQ93

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What output is expected from the following code?

Question Image

Explanation

Each pair of backslashes in a Python string literal represents one literal backslash character. The resulting string contains two backslashes, so len(x) prints 2.

Community Discussion

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