đ A Python Trick to Quietly Impress Your Colleagues
- mark
- Mar 17
- 1 min read
As more and more geologists in mining companies turn to Python scripting for handling drillhole data, block models, QAQC, and reporting, the little things start to matter.
You might not notice this one at first.
It wonât revolutionize your workflow.
But it will save you a few seconds â and make your debug output look slick đ.
If youâre working with assay tables, tonnage estimates, or anything buried in CSVs and models, Python 3.12 just added a neat trick: f-string debugging.
Enhanced f-string Debugging
Instead of typing this:

Now you can write:


No fuss, no formatting, no need to remember what variable is what. Just clean, readable output â especially handy when your script is spitting out facies proportions or block estimates.
âď¸ Why Itâs a Handy Win for Mining Geos
đ§Ş Ideal for quick checks while cleaning or merging drillhole datasets
đ Makes QAQC outputs clearer when checking grade distributions
đ¤ A subtle way to show off next time you're pair-programming with another geo
So the next time youâre looping through intervals or compositing grades in Python, toss in an f"{mean_grade=}"Â and let the console look smart for you đ
Already using Python 3.12?Let us know your favorite new feature.
Comments