In [1]:
s = '0123456789'

In [2]:
print(s[3:7])


3456

In [3]:
print(s[3:-3])


3456

In [4]:
print(s[:5])


01234

In [5]:
print(s[5:])


56789

In [6]:
print(s[:3] + s[6:])


0126789

In [7]:
def remove_str_start_end(s, start, end):
    return s[:start] + s[end + 1:]

In [8]:
print(remove_str_start_end(s, 3, 5))


0126789

In [9]:
def remove_str_start_length(s, start, length):
    return s[:start] + s[start + length:]

In [10]:
print(remove_str_start_length(s, 3, 5))


01289