spyder - Getting different result using "run" button and "run this cell" button for the same body of code in python -


i use "run" button run whole body of code. choose whole body of code , push "run cell" button , different results. using "spyder" write code. why happening?

@fairy, "cell" in spyder defined using special comment

# %% cell defined here

are using this?

update

@fairy, need use cell syntax so:

# %% cell 1 = 1       # start of cell 1 b = 2 print(a*b)  # end of cell 1  # %% cell 2 c = 1.0     # start of cell 2 d = 2 print(a/b)  # end of cell 1 

now can run cells, delimited special comment


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -