--- a/doc/html/logic_programming/rules/backward_chaining.html
+++ b/doc/html/logic_programming/rules/backward_chaining.html
@@ -288,7 +288,7 @@
 >>> from __future__ import with_statement
 >>> with engine.prove_n('bc_example', 'uncle_nephew', ('fred',), 2) as gen:
 ...     for vars, no_plan in gen:
-...         print vars
+...         print(vars)
 ('michael', ())
 </pre>
 </blockquote>