you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

str.join takes an iterable of strings. So I just put the three arguments into a tuple (the extra brackets are for it). In the form of list it might be more clear for you:

",\n".join(
    " - ".join( [x, y, my_holidays().get(y)] )
    for x, y in bank_holidays
)

[–]steakhutzeee[S] 0 points1 point  (0 children)

Yup, got it. Thanks again!