Keyboard control of collapse/expand triangles in the List view [duplicate]

When a folder is selected in the List view, press:

  • to fold (collapse) it,
  • to unfold (expand) it.

If multiple folders are selected concurrently, all of them will be (un)folded.

See also:

  • https://apple.stackexchange.com/a/158748/90319
  • https://www.alvinpoh.com/how-to-use-a-keyboard-shortcut-to-expand-or-collapse-all-folders-in-mac-finder/