Stack Tutorial: An implementation beginner’s guide

Prerequisites In order to understand this stack tutorial, you’ll need to learn the Stack data structure which requires the following: Python 3 Basic data structure concepts like List (Click here to refresh List concepts) OOP concepts What is a Stack? Howdy! If you are reading this article, you are about to learn one of the […]

Read More

HTML Parser: How to scrape HTML content

Prerequisites Knowledge of the following is required: Python 3 Basic HTML Urllib2 (not mandatory but recommended) Basic OOP concepts Python data structures – Lists, Tuples Why parse HTML? Python is one of the languages that is extensively used to scrape data from web pages. This is a very easy way to gather information. For instance, […]

Read More

How to Pickle: A Pickling and Unpickling Tutorial

Prerequisites Knowledge of  the following is required: Python 3 Basic Python data structures like dictionary File operations in Python Introduction Literally, the term pickle means storing something in a saline solution. Only here, instead of vegetables its objects. Not everything in life can be seen as 0s and 1s (gosh! philosophy), but pickling helps us […]

Read More

How to Use Python to Multiply Strings

We’ve already gone over how to use multiplication in Python, but did you know that Python can be used to multiply things other than numbers? In fact, you can use Python to multiply strings, which is actually pretty cool when you think about it. You can take a string and double, triple, even quadruple it […]

Read More

Quick Tip: How to Transpose a Matrix Using Python

You might remember this from math class, but if even if you don’t, it should still be pretty easy to follow along. We’ve already gone over matrices and how to use them in Python, and today we’re going to talk about how you can super quickly and easy transpose a matrix. When you transpose a […]

Read More

How to Convert Dictionary Values to a List in Python

In Python, a dictionary is a built-in data type that can be used to store data in a way thats different from lists or arrays. Dictionaries aren’t sequences, so they can’t be indexed by a range of numbers, rather, they’re indexed by a series of keys. When learning about dictionaries, it’s helpful to think of […]

Read More

Quick Tip: Using Python’s Comparison Operators

Just like in any other OOP languages, Python uses comparison operators to compare values. These are often called Boolean operators, because the word Boolean indicates that the result of using the comparison operator is a Boolean value: true or false. What follows is a list of the Boolean values that can be used in Python when […]

Read More

Python Tricks: Storing Multiple Values

In this post, we’re going to talk about how to store and manipulate values in a Python list. Understanding all the ways you can store and use values is integral to mastering any coding language, and Python is no exception. For the purposes of this post, let’s use the following list as an example: l […]

Read More

How to Use Python to Convert Miles to Kilometers

It can be so frustrating that the entire planet can’t just agree on one system of measurement, whether it relates to measuring distances, weights, temperatures, etc (for the record…same goes for which side of the road everyone drives on). If every country used the same units of measurement, then these formulas would be useless and […]

Read More

How to Use Python to Convert Fahrenheit to Celsius

There aren’t many easy tricks you can use to easily convert Fahrenheit to Celsius (or vice versa) in your head. Unless you’re great with numbers, the formulas aren’t exactly something you can you figure out using mental math. If you’re not so great with numbers, there’s calculators for that. Or, if you feel so inclined, the formulas […]

Read More