Ninad

Ninad

A Python and PHP developer turned writer out of passion. Over the last 6+ years, he has written for brands including DigitalOcean, DreamHost, Hostinger, and many others. When not working, you'll find him tinkering with open-source projects, vibe coding, or on a mountain trail, completely disconnected from tech.
Environment Variables in Python: A Complete Guide

Environment Variables in Python: A Complete Guide

When a Python program needs settings that vary between machines, keeping those values out of its source code lets you change configuration separately. Environment variables are named text values supplied to a running process, and Python reads them through os.environ.…

Python sorted() to Sort Lists

Python sorted() to Sort Lists

Ordering a list of scores or names in Python doesn’t require writing your own sorting routine. The built-in sorted() returns a new list of the items in order and leaves the original unchanged. I’ll walk you through sorting in either…

SciPy Minimize: Fit a Function and Check the Result

SciPy Minimize: Fit a Function and Check the Result

Fitting a line to data points means finding the slope and intercept that make the line’s errors as small as possible. SciPy’s minimize function searches for those values, starting from a guess you give it. The example writes the error…

How to Reverse a List in Python

How to Reverse a List in Python

Putting a Python list in the opposite order can mean changing the list itself or making a reversed copy. The reverse() method changes the list in place, while a slice with a step of -1 gives you a reversed copy…