Learning question...

swapsun at gmail.com swapsun at gmail.com
Wed May 7 09:01:55 EDT 2008


On May 7, 8:36 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> swap... at gmail.com wrote:
> > Any idea why the following program does not work? I was learning IO on
> > Python and the following generates a TypeError: range() integer end
> > argument expected, got str.
> > I am a beginner.
>
> Because raw_input does return you as string which you need explicitly
> convert to a number, e.g. doing
>
> i = int(input)
>
> Diez

Thank you, Diez!



More information about the Python-list mailing list