Given two lists indicating friend acceptance date and the friendship removal dates:
accept = [(user1, user2, '2019-01-01'), (user1, user6, '2018-10-09'), (user3, user4, '2018-12-27'), (user1, user2, '2020-06-08')]
remove = [(user3, user4, '2019-04-07'), (user2, user1, '2020-01-01'), (user1, user6, '2020-10-09')]
**Please output **all the friend pairs with its start date and end dates, for example: [(user1, user2, '2019-01-01','2020-01-01'), (user1, user6, '2018-10-09', '2020-10-09'), (user3, user4, '2018-12-27', '2019-04-07'), (user1, user2, '2020-06-08', 'now')]
Could someone figure out other solutions to this problem? It would be great if the code is also attached! Thanks!!