#22170: avoid printing newlines twice in tutorial example.
#22170: merge with 3.4.
Issue #22060: Clean up/simplify test_ctypes, use test discovery
Closes #22060: Merge with 3.4