Fixed #19211 -- Adapted tutorial for Python 3