Extract specific events from ics and save them in order

If you want a list like that, I would make use of a Treemap , using the (properly formatted!) dates as keys and the types as values (or actually maybe already the fully formatted string “Type x: yth of Z”.
Subsequently you can iterate over that map to get your output.

I’ve used something like that to answer another topic related to sorting (in a slightly different context), see here:

1 Like