Last answered:

05 Dec 2022

Posted on:

04 Dec 2022

0

Why everytime i run a function, i get output for all the other functions tooo

Evertytime I play the run command , all the previous function I have typed i get output for all. What should I do to get output only for the current function and not for all

eg:
runcell(0, 'C:/Users/ankz1/.spyder-py3/temp.py')
6
1
7image.png

1 answers ( 0 marked as helpful)
Instructor
Posted on:

05 Dec 2022

0

Hey Ankita,

Thank you for reaching out!

In Spyder, pressing the green arrow, or F5, executes the entire code in the file. If you want to execute the line you're currently on, then place your cursor there and click on the button shown below (or use the F9 shortcut):
image.png

Kind regards,
365 Hristina

Submit an answer