aboutsummaryrefslogtreecommitdiff
blob: 419425b7b06ad05c83e8b5622b39f97a5a9103d7 (plain)
1
2
3
4
5
def pivot(string, idx, keep_pivot=True):
    if keep_pivot:
        return (string[:idx], string[idx:])
    else:
        return (string[:idx], string[idx+1:])