Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30448
| From | Peter Pearson <ppearson@nowhere.invalid> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: howto handle nested for |
| Date | 2012-09-29 01:15 +0000 |
| Message-ID | <acn0dcF4qamU1@mid.individual.net> (permalink) |
| References | <k44cr4$jtj$1@ger.gmane.org> <mailman.1565.1348847408.27098.python-list@python.org> |
On Fri, 28 Sep 2012 09:49:36 -0600, Ian Kelly <ian.g.kelly@gmail.com> wrote: > > levels = 6 > for combination in itertools.product(xrange(n_syms), levels): > # do stuff >>> n_syms = 3 >>> levels = 6 >>> for combination in itertools.product(xrange(n_syms), levels): ... print combination ... Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'int' object is not iterable -- To email me, substitute nowhere->spamcop, invalid->net.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: howto handle nested for Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-28 09:49 -0600
Re: howto handle nested for Peter Pearson <ppearson@nowhere.invalid> - 2012-09-29 01:15 +0000
Re: howto handle nested for Hans Mulder <hansmu@xs4all.nl> - 2012-09-29 14:41 +0200
csiph-web