Python core Flashcards
(2 cards)
1
Q
What is register_line_cell_magic
in IPython?
A
It is a decorator that allows defining a function that works as both a line magic (%magic
) and a cell magic (%%magic
) in Jupyter Notebooks.
2
Q
What is the difference between line magic and cell magic?
A
Line magic (%magic
) operates on a single line, while cell magic (%%magic
) works on multiple lines in an entire cell.