Question: I need help trying to convert a python list of a tuple into a new list of tuples that shows the first and last element

I need help trying to convert a python list of a tuple into a new list of tuples that shows the first and last element of each tuple.
Example list:
list =[('Johnny, 'walter', 'James', 'whale', '9'),
('Outside', 'dark', 'chocolate', 'filter', 'interview'),
('Elliot', 'limping', 'injured', 'plan', 'tie')]
new_list =[('Johnny,'9'),('Outside', 'interview'),('Elliot', 'tie')]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!