def substr(string, start, length=None):
    if (start < 0):
        start = (start + len(string))
    if (not length):
        return string[start:]
    elif (length > 0):
        return string[start:(start + length)]
    else:
        return string[start:length]
def substr(string, start, length=None):
    if (start < 0):
        start = (start + len(string))
    if (not length):
        return string[start:]
    elif (length > 0):
        return string[start:(start + length)]
    else:
        return string[start:length]