capture_output does not respect trailing semicolon (#13940)...
capture_output does not respect trailing semicolon (#13940)
This change tests whether the Python code inside the `%%capture` magic
ends with a `';'`. If it does, the code no longer creates the object
that is supposed to store the cell output. If such object already
exists, it is deleted.
Please review and suggest changes if you think they can improve the
solution. Thanks.