row = (id, name, department, salary, hire_year), implement contact_fields(row) returning a new tuple with only name and department (indexes 1 and 2), using tuple slicing. Then implement trailing_fields(row) returning the last two elements (salary, hire_year), also via slicing.contact_fields((7, 'Neha', 'Engineering', 120000, 2021))
('Neha', 'Engineering')row[1:3] slices out indexes 1 and 2.
trailing_fields((7, 'Neha', 'Engineering', 120000, 2021))
(120000, 2021)
row[-2:] grabs the final two elements.
row[1:3] slices indexes 1 up to (not including) 3.
row[-2:] takes the last two elements from the end.