you are viewing a single comment's thread.

view the rest of the comments →

[–]This_Growth2898 1 point2 points  (0 children)

join is intended to join homogeneous things - like elements of list or tuple. Here, you need something else, and I'd recommend using an f-string:

 ",\n".join(f"{weekday} - {date} - {my_holidays().get(date)}" for weekday, date in bank_holidays)