> What's the invalid syntax in the following code? I tried figuring it out > by > myself, and I couldn't. > > # Inspired by Programming and Problem Solving with Java, 1st ed., question > def date(): > int year > year = int(raw_input("Year please: "))
> The editor highlights the word year in the line: > > int year That'd be because int year is invalid syntax in Python. You don't need to decalre variables prior to use in Python as you do in Java. Also names in Python are not typed. Alan G _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor