Timeline for Why does `print(exec(...))` return `None`?
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Dec 27, 2021 at 12:33 | vote | accept | Mohammedsohil Shaikh | ||
| S Dec 27, 2021 at 12:33 | vote | accept | Mohammedsohil Shaikh | ||
| S Dec 27, 2021 at 12:33 | |||||
| S Nov 28, 2021 at 13:56 | vote | accept | Mohammedsohil Shaikh | ||
| S Dec 27, 2021 at 12:33 | |||||
| S Nov 28, 2021 at 13:56 | vote | accept | Mohammedsohil Shaikh | ||
| S Nov 28, 2021 at 13:56 | |||||
| Nov 28, 2021 at 13:56 | vote | accept | Mohammedsohil Shaikh | ||
| S Nov 28, 2021 at 13:56 | |||||
| Nov 16, 2020 at 11:42 | review | Close votes | |||
| Nov 20, 2020 at 0:06 | |||||
| Nov 16, 2020 at 11:21 | comment | added | Georgy | Does this answer your question? Python3 exec, why returns None? | |
| Nov 14, 2020 at 16:46 | comment | added | ransh | If you want to get rid of the None you can just print the result inside x and not doing print(exec(x)) but only exec(x) and print what you want inside | |
| Nov 14, 2020 at 16:03 | answer | added | vvvvv | timeline score: 2 | |
| Nov 14, 2020 at 16:02 | history | edited | Matt Morgan | CC BY-SA 4.0 |
edited title
|
| Nov 14, 2020 at 15:55 | answer | added | azro | timeline score: 2 | |
| Nov 14, 2020 at 15:55 | comment | added | quamrana | I guess the ‘None’ comes from ‘exec()’ which you print. So just call the ‘exec()’ | |
| Nov 14, 2020 at 15:54 | history | edited | azro | CC BY-SA 4.0 |
added 68 characters in body
|
| Nov 14, 2020 at 15:53 | history | asked | Mohammedsohil Shaikh | CC BY-SA 4.0 |