[Tutor] First program
Steven D'Aprano
steve at pearwood.info
Sat Mar 13 03:52:01 CET 2010
On Sat, 13 Mar 2010 01:11:25 pm Ray Parrish wrote:
> Here's what I get from that, could you please explain why?
>
> >>> print('{0}, is not a valid choice'.format(choice))
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'str' object has no attribute 'format'
The original poster is using Python 3.0 or 3.1, you are using an earlier
version.
--
Steven D'Aprano
More information about the Tutor
mailing list