**Question regarding 4th exercise on book tracker assignment (module #2, last assignment)
(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not. You can share the errors you get)
This is the error:
TypeError Traceback (most recent call last)
Cell In[27], line 8
1 ### START CODE HERE ###
2 #print(f"name is {book[‘borrower’]}“)
3 # Iterate through the borrowers_list
4 # Look for ‘borrower’ in `borrowers_list`
5 # Add your ‘for’ loop here
7 for borrower in borrowers_list:
----> 8 if book[‘borrower’]==borrowers_list[‘name’]:
9 borrower_email= borrowers_list[‘email’]
10 print(f”{book[‘borrower’]}'s mail is: {borrower_email}")
TypeError: list indices must be integers or slices, not str
General comment: The chat response did not help me solve it, also, not clear to my why is the FOR loop needed here.