[Tutor] What does "TypeError: 'int' object is not iterable" mean?

David Hutto smokefloat at gmail.com
Fri Oct 22 16:17:26 CEST 2010

On Fri, Oct 22, 2010 at 9:55 AM, Richard D. Moores <rdmoores at gmail.com> wrote:
> On Fri, Oct 22, 2010 at 06:47, David Hutto <smokefloat at gmail.com> wrote:
>>> which works fine, but a question remains: n is an integer. Why the 's'
>>> in '%sf'?
>> Right here:
>> http://docs.python.org/release/2.5.2/lib/typesseq-strings.html
> Sorry, but I don't see the answer to my question there.

Usually the docs explain it better than I do, which is why I prefer
references. But short answer is, if you'll look in the chart on the
page given above, it states :

%s 	String (converts any python object using str()).

So each % tells the string what to expect while interlacing that which
is given at the end. of the string after the final %

> Dick

More information about the Tutor mailing list