This code runs fine on Jupyter. However, you will get
You don't need 'print' to have cell output. Just enter 'quicksort([3, 6, 8, 10, 1, 2, 1])' in cell and hit shift + enter.
By default you will have output of last expression in cell:
'invalid syntax'
if you try print quicksort([3, 6, 8, 10, 1, 2, 1])
. You have to print(quicksort([3, 6, 8, 10, 1, 2, 1]))
because you probably have Python 3 kernel (have a look at Installing the IPython kernel)You don't need 'print' to have cell output. Just enter 'quicksort([3, 6, 8, 10, 1, 2, 1])' in cell and hit shift + enter.
By default you will have output of last expression in cell:
1 + 1 1 + 2
Output:3
If you want to have all outputs of expressions in cell at once then you have to run:from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all"After that you will have output of all expressions in cell (previous example will produce 2 and 3) without need of 'print'.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.