I have a python string array. How do I index the stop and end of this array with string? i.e. Is there a way I can get from "dad" to "dog", inclusive, by setting the start and stop of this array? I can assume that there are no repetitions, and the unique array is ordered as I want to.
fam_arr = ['mom', 'dad', 'sister', 'brother', 'dog', 'cat']
output:
subset_arr = ['dad', 'sister', 'brother', 'dog']