Fixed example to work with python3

Just some print parentheses added.
Merge pull request #5832 from Zaharid/ip3fix

Fixed example to work with python3