Use a colon inside the index brackets to get a "slice" of the list, returned as a list.
element_slice = elements[1:5] # from index 0 up to (not including) index 5
print(element_slice) # Prints ['He', 'Li', 'B', 'C']
-------------corrected below ----------------
from index 1 up to (not including) index 5
Index starts from 1 not 0 for this example of slice
Use a colon inside the index brackets to get a "slice" of the list, returned as a list. element_slice = elements[1:5] # from index 0 up to (not including) index 5 print(element_slice) # Prints ['He', 'Li', 'B', 'C']
-------------corrected below ----------------
from index 1 up to (not including) index 5
Index starts from 1 not 0 for this example of slice