#22170: avoid printing newlines twice in tutorial example.
#22170: merge with 3.4.