Say I have a list arr and an index i within [0:len(arr)], how do I get all the elements starting from arr[i] up to arr[-1] in a Pythonic way? For example:
arr = 'abcdef'
i = 3
I basically want to get b = 'def' I tried
b = a[i:-1]
but obviously that'll leave out the last element. Also, my list sometimes has only 1 element, so i = 0. How do I safely treat that edge case? Thank you!