Looking over some class notes and I came across this piece of code. I copied it exactly from the notes but when i run it, it gives me a syntax error on the final line. Anyone able to point out the mistake?
phone_book = { 'joe' : '086 7346659',
'jimmy' : '085 2313872',
'cindy' : '087 9452238' }
print(sorted(phone_book.items()))
for k, v in sorted(phone_book.items()):
print(f' {k} ---> {v}')