def get_first_element(items): # Accessing by index takes the same time # no matter how large the list is. return items[0] numbers = [4, 8, 15, 16, 23, 42] print(get_first_element(numbers)) # 4
Click Run to execute this code.