Write function elements that take list of lists called data


Problem

Write function last elements that take a list of lists called data as its argument. The function should return a list containing the last element of each list in data. Note that the sublists of the list passed as data can have different lengths; if data contains an empty list [], the corresponding last element should be listed as None. So for instance the call last elements ([[1,2,3], [], ['a', 'b']]) should return the list [3, None, 'b']. For full marks, use exception handling to deal with empty sub lists.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write function elements that take list of lists called data
Reference No:- TGS03219997

Expected delivery within 24 Hours