[Tutor] What does "TypeError: 'int' object is not iterable" mean?
alan.gauld at btinternet.com
Thu Oct 21 16:43:05 CEST 2010
"Richard D. Moores" <rdmoores at gmail.com> wrote
> unchanged_count, higher_count, lower_count, secs =
> sleep_seconds_control(unchanged_count, higher_count, lower_count,
> TypeError: 'int' object is not iterable
> I'm at a loss as to what the error means.
a.. def sleep_seconds_control(unchanged_count, higher_count,
a.. if unchanged_count >= 2:
a.. secs += 5
a.. secs = 10
a.. return secs
You return secs
You try to assign that single value to 4 variables.
Python tries to do it and finds that it can't break secs into 4 bits
its not a sequence(not iterable).
Author of the Learn to Program web site
More information about the Tutor