Quick help for a python newby, please

Chris Angelico rosuav at gmail.com
Wed Nov 23 19:59:17 EST 2016


On Thu, Nov 24, 2016 at 10:02 AM, Wildman via Python-list
<python-list at python.org> wrote:
> Try the code that is below:
>
> import datetime
> from datetime import date
>
> today = date.today()
> person = input("Enter your name: ")
> byear = raw_input("Enter the four-digit year you were born: ")

Please take care of Python versions. The OP said Python 3, and you've
kept one input() call, but then you've used raw_input for the rest.
These should all be input() calls in Py3.

ChrisA



More information about the Python-list mailing list