You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Further explanation: https://docs.python.org/3/reference/expressions.html?highlight=slice#slicings
# "One way to remember how slices work is to think of the indices as pointing between characters, with the left edge of the first character numbered 0."
# +---+---+---+---+---+
# | f | u | n | d | a |
# +---+---+---+---+---+
# 0 1 2 3 4 5
#-5 -4 -3 -2 -1
if __name__ == '__main__':
l = ['f', 'u', 'n', 'd', 'a']
# Take items from 1 to 4, upper bound non-inclusive