Get the First or Last N Characters of a Python String
Get the first or last N characters of a Python string with text[:n] and text[-n:], including zero, oversized and combined slices.
Read guide1 guide filed under this subject.
Get the first or last N characters of a Python string with text[:n] and text[-n:], including zero, oversized and combined slices.
Read guide