SQL: Data Types

Data Types Each field in a Table has a Type. A Data Type is used to specify what kind of object that particular field will store. When creating your own structures, using the right type for the right data is…

union(): merging Sets in Python

The union() method merges as many sets as you want and returns a new set as a result. The items in the new set are unique, meaning no repetitions. In the example below both sets together should equal 6 items,…

SQL: Tables and Basic Structure

This is a direct continuation of my previous article Introduction to SQL. SQL works on a structure with four components: Table, Field, Row, and Column. You can think of those components exactly like the ones in spreadsheets like Excel. A…

Introduction to SQL

It doesn’t matter if you are a frontend, backend, or a full stack developer, knowing SQL is a must have skill. What is SQL and why you should learn it SQL stands for Structured Query Language. It is pronounced SEQUEL.…

isdisjoint(): checking if two Sets are disjoint in Python

The isdisjoint() method checks for items that exist in both sets. If one or more items exist in both sets, the method returns False, otherwise it returns True, which means the Sets are disjoint. car_brands_set_one and car_brands_set_two have ‘bmw’ in…

How to find the index of an item in a tuple in Python

Use the buit-in index() method from tuple to find the index of an item in a tuple. Remember the index count starts at 0, so the position of ‘mclaren’ is 2. car_brands = ('bmw', 'ferrari', 'mclaren') position = car_brands.index('mclaren') print(position)…

Create an API in Python real quick with Flask

Flask is a micro web framework written in Python. Being a microframework, it does not require particular tools or libraries. You can install it using pip. In my system I have pip pointing to Python 2 and pip3 pointing to…

filter(): filter an iterable based on a function in Python

The filter() function will filter an iterable based on a given function. Dictionaries, lists, and tuples are examples of iterables. The first argument is the function name, the second argument is the iterable. Let’s filter to have only the numbers…