I have bigger data than this but I can use it as an example. Please, write a python 3.6 code for the question.
expenses = [['De La Fuente', 'Roque', 'NY', 6000, 'Prof. Srvcs.'], ['De La Fuente', 'Roque', 'NY', 6000, 'Prof. Srvcs.'], ['Malliotakis', 'Nicole', 'MA', 40000, 'Television Ads.'], ['Marte', 'Christopher', 'NY', 5152, 'Radio Ads.'], ['Yeger', 'Kalman', 'NY', 23000, 'Campgn Consuls.'], ['Marte', 'Christopher', 'CA', 5711, 'Other: explntion']]
![DATA expenses [[De La Euente, Roque, NY, 6000, Prof. Srvcs,], [De La Fuente, Roque, NY, 6000, Prof. Srvcs. [Mall](http://img.homeworklib.com/questions/1fb3b4b0-d1e1-11ea-b862-31337d2b3541.png?x-oss-process=image/resize,w_560)
expenses = [['De La Fuente', 'Roque', 'NY', 6000, 'Prof. Srvcs.'], ['De La Fuente', 'Roque', 'NY', 6000, 'Prof. Srvcs.'], ['Malliotakis', 'Nicole', 'MA', 40000, 'Television Ads.'], ['Marte', 'Christopher', 'NY', 5152, 'Radio Ads.'], ['Yeger', 'Kalman', 'NY', 23000, 'Campgn Consuls.'], ['Marte', 'Christopher', 'CA', 5711, 'Other: explntion']]
# user input for last name of candidate
last_name = input('Enter the last name of candidate: ')
# for displaying total amount of expenses
expense_amount = [row[3] for row in expenses]
print('Total Expenses', sum(expense_amount))
# for displaying expenses for a particular candidate
candidate_amount = [row[3] for row in expenses if row[0] == last_name]
print('Expenses for candidate with last name', last_name, ':', sum(candidate_amount))
![In [4]: runfile ( C:/Users/Administrator/.spyder- py3/ temp.py, wdir=C:/Users/Administrator/. spyder-py3) Enter the last](http://img.homeworklib.com/questions/2093b550-d1e1-11ea-aa36-53dfcf9133ad.png?x-oss-process=image/resize,w_560)
For help and modification please comment.
Thank You
I have bigger data than this but I can use it as an example. Please, write...