When learning Python, you usually write code in a .py file and run the entire file to see the output. However, sometimes you want to execute only a few lines, inspect a variable, or test an idea ...