Hacker News new | past | comments | ask | show | jobs | submit login

Why not make it work in python 2 and 3?

import sys

if sys.version_info.major >= 3: raw_input = input

eval(raw_input())




I would write it as input = raw_input.

Or, better, just use the six package.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: