Monthly Archives: June 2017


What is a boolean? A boolean is a variable that is either True or False. We say the datatype of a variable can be booelan. You can think of it like a light switch, its either on or off. Note: A bit is the smallest unit in a computer. Its either 0 or 1, True […]


Variables in Python can hold text and numbers. For example:

The variable names are on the left and the values on the right. Once a variable is assigned, it can be used in other places of the program. Related Course: In the example above, we have three variables: x, price and word. Note: Variables […]

Global variables

What is the difference between global and local variables? A global variable can be accessed anywhere in code. A local variable can only be used in a specific code block. Related course: global variable example We say the scope is global, it can be used in any function or location throughout the code. In the […]


A tuple is a collection that cannot be modified. Variables can be of the datatype tuple. A tuple is defined using parenthesis. If you want to change the data during program execution, use a list instead of a tuple. Related Courses Example A tuple with one item ( a comma is needed in the end […]


A dictionary in Python is a one to one mapping. Every key points to a value, separated by a colon (:). A dictionary is defined using curly brackets. The value left of the colon is called the key, the value right of the colon is called the value. Every (key,value) pair is separated by a […]

Socket Client

How do you open a network connection? Sockets are the basis of any network communication in your computer.  If you open a website, a socket is created in the background. The same thing applies to chat applications or any other network application. Related Courses Complete Python Bootcamp: Go from zero to hero in Python Python […]

kmeans text clustering

Given text documents, we can group them automatically: text clustering. We’ll use KMeans which is an unsupervised machine learning algorithm. I’ve collected some articles about cats and google. You’ve guessed it: the algorithm will create clusters. The articles can be about anything, the clustering algorithm will create clusters automatically. Even cooler: prediction. Related course: Data […]

Neural Network

In this article you’ll learn about Neural Networks. What is a neural network? The human brain can be seen as a neural network —an interconnected web of neurons . In Machine Learning, there exist an algorithm known as an Aritifical Neural Network. They mimic biological neural networks. A network always starts with a single unit: […]


A list is a collection of objects Everything in Python is an object. These objects in a list are numbers in most cases. Lists can also contain text (strings) or both. Note: Lists can have zero or more elements (empty lists are possible).   Related Course: Lists Example A list is defined using square brackets. […]

List comprehensions

What is list comprehension? List comprehensions are an easy way to create lists. Its much easier to write a one liner than it is to write a for loop, just for creating a list. This one liner is called a list comprehension. Related Course: Example Assume we want to create a list containing 100 numbers. […]