Trying to preserve the meaning of the examples. Not all occurrences in `docsite/rst/playbooks_lookups.rst` have been changed for instance to allow the unchanged examples to be used for testing. Related to: #17479
This syntax works on Python 2.6 through 3.x. lib/ansible/module_utils (and lib/ansible/modules) need to support Python 2.4, so I didn't touch those.