Computer Science

For any index n, s[:n] + s[n:] will give you original string s.

Python String Manipulation

1 Like

Answer

True

Reason — s[:n] — The slicing of a string starts from index 0 and ends at index n-1.
s[n:] — The slicing of a string starts from index n and continues until the end of the string.
So when we concatenate these two substrings we get original string s.

Answered By

1 Like


Related Questions