I think this is a very useful feature for beginners. When I learned R, I would keep my notes for each lesson in one file and execute the lines that I wanted. Now I'm learning Python, and I have to save each new thing in a different file. Is there no IDE that can do what R does? I'm currently using PyCharm.
The RStudio IDE(opens in a new tab) is a free and open-source IDE for Python, as well as R. You can write scripts, import modules, and interactively use Python within the RStudio IDE. To get started writing Python in the RStudio IDE, go to File, New File, then Python Script.
Challenge: Run a piece of Python code forever—until it is forcefully interrupted by the user. Solution: use a while loop with a Boolean expression that always evaluates to True . Examples: have a look at the following variants of an infinite while loop.
In PyCharm, select a code fragment you want to execute then choose "Execute selection in console" (Alt+Shift+E in my keymap).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With