List Indexing

Warning

  • Does start at 1, not 0. This is fine.
  • Doing something like list[-2] removes the second entry, it does not start printing from the back like in Python.
mylist[1]
[1] 10
 
mylist[1:4] # slicing that baby
[1] 10 9 8 7
 
mylist[-2] # **careful, this removes the items from the list, it doesn't start printing from the end**
[1] 10 8 7 6 5 4 3 2 1