Master Python REPL: Quickly Access the Last Result Using the Underscore
You can obtain the result of the last expression in a Python REPL with the underscore operator, e.g. in the Python REPL this looks like:
>>> 3 * 3 9 >>> _ + 3 12
This works in the IPython shell too. In addition, the IPython shell allows you to use Out[n] to get the value of the expression In[n]. E.g., Out[1] would give us the number 9 in the example below:
In [1]: 3 * 3 Out[1]: 9 In [2]: Out[1] + 3 Out[2]: 12 In [3]: _ + 3 Out[3]: 15
Python
- Zirconium in Nuclear Reactors: The Essential Cladding Metal
- Molybdenum in Medicine: Advanced Applications in Breast Imaging and Bone Repair
- How Digital Twins Revolutionize Manufacturing: Benefits, Applications, and ROI
- How Technology Is Transforming Manufacturing: From 3D Printing to Digital Twins
- How Plastic Materials Are Revolutionizing Modern Construction
- Laser Cutting: Precision & Efficiency in Sheet Metal Prototyping
- How Automation is Transforming Manufacturing: Boosting Efficiency & Cutting Costs
- The Benefits of Augmented Reality in Industry 4.0
- Embrace Cutting-Edge Tech: Transforming Manufacturing for Competitive Edge
- How Sensors Power Modern Automobiles: Key Roles and Impact