In my 10+ years in software I've made parts of MS Office, built data tooling and did data science for products with 100+ mil. users
Here I summarize the best lessons from the industry.
Python enumerate - How it actually works?
Python's built-in enumerate function simplifies iteration with a counter. Here we show how it's used and build it from scratch using iterators.
Python Tuples - Basics, examples, unpacking, tuples vs. lists
In Python, tuples are a sequence data type, very similar to lists. We create tuples by using a comma-separated list of values.
How to print to stderr in Python
In order to have Python print to stderr , we'll need to point the print function to the sys.stderr file. It's done slightly differently in Python 3 than in Python 2.
The Zen of Python - Principles and History
The Zen of Python is a set of 19 principles written by Tim Peters. They were written to capture the guiding principles behind the design decisions for the early versions of the language.
How to show rsync progress
How to show the progress of a long-running rsync transfer. Learn the several options with the important caveats.
Priority Queue in Python
Priority queue is a data structure similar to a regular queue, but where elements have priorities assigned. Python comes with a built-in PriorityQueue class contained in the queue module.
Python Swap - How to Swap Two Variables the Python Way
It's simple. For any two variables (a, b) we can swap their values in a single assignment statement
Calculating Variance in Python - Explained
You have a list of numbers and you want to calculate its variance. Here are the methods to do that in Python.
Python sort lambda - How to sort with lambda key function in Python
Sorting in Python is simple. You'll pass a list, dict or set to the built-in function sorted. Using the key parameter allows us to modify the default sorting behavior.
Probability Interview Questions - Solution to Problem #1.4
There are two balls in a bag. I tell you that at least one of them is red. What is the probability that both are red?