Computer Science

What happens when from a string slice you skip the start and/or end values of the slice?

Python String Manipulation

19 Likes

Answer

If start value is skipped, it is assumed as 0 i.e. the slice begins from the start of the string.

If end value is skipped, it is assumed as the last index of the string i.e. the slice extends till the end of the string.

Answered By

11 Likes


Related Questions