DOC: update str.cat example
There have been a couple of changes recently due to the whole docstring validation effort (e.g. #22838), which got rid of some warnings emitted by the sample code.

As it stands, the code samples don't really reflect the running text anymore, and with the changes from #22264, it makes sense to update the running text as well.