The current code is a syntax error in Python 3. The proposed code works as expected in both Python 2 and Python 3.