1.

What does “slice” do?

Answer»

The slice[n:m] operator extracts subparts from a string. It doesn’t include the character at index m.

(eg) S = “Hello World”

print s[0:4] → Hell



Discussion

No Comment Found