The following code:
x = "\\" print(len(x))
- will print 2
- will cause an error
- will print 3
- will print 1
Explanation: The string passed to the x variable contains the following sequence of characters: escape character, backslash, escape character, and backslash. Escape characters don’t count toward the length of a string.
More Questions: Python Essentials 2 (PE2) Course Final Test
Please login or Register to submit your answer