For py2/3 compatibility, input = raw_input. Thanks @regebro :first_quarter_moon_with_face: