Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104385
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: exec "x = 3; print x" in a - How does it work? |
| Date | 2016-03-09 16:50 +1100 |
| Message-ID | <mailman.68.1457502660.15725.python-list@python.org> (permalink) |
| References | <nboc29$up4$1@dont-email.me> |
"Veek. M" <vek.m1234@gmail.com> writes: > What is the return value of `exec`? You can refer to the documentation for questions like that. <URL:https://docs.python.org/3/library/functions.html#exec> > Would that object be then used to iterate the sequence in 'a'? The ‘for’ or ‘while’ statements are correct for iteration. > I'm reading this: > https://www.python.org/download/releases/2.2.3/descrintro/ Why? -- \ “Generally speaking, the errors in religion are dangerous; | `\ those in philosophy only ridiculous.” —David Hume, _A Treatise | _o__) of Human Nature_, 1739 | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
exec "x = 3; print x" in a - How does it work? "Veek. M" <vek.m1234@gmail.com> - 2016-03-09 10:57 +0530
Re: exec "x = 3; print x" in a - How does it work? Ben Finney <ben+python@benfinney.id.au> - 2016-03-09 16:50 +1100
Re: exec "x = 3; print x" in a - How does it work? "Veek. M" <vek.m1234@gmail.com> - 2016-03-09 11:51 +0530
Re: exec "x = 3; print x" in a - How does it work? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-03-09 16:54 +1100
Re: exec "x = 3; print x" in a - How does it work? "Veek. M" <vek.m1234@gmail.com> - 2016-03-09 11:55 +0530
Re: exec "x = 3; print x" in a - How does it work? Chris Angelico <rosuav@gmail.com> - 2016-03-09 17:34 +1100
csiph-web