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…
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…
The difference() method checks the difference between two sets. It returns a new set of the items contained in the first set that are not in the second set. In the example below, both sets have ‘bmw’, but ‘mclaren’ and…
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,…
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…
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.…
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…
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)…
The popitem() method removes the last item inserted in a dictionary. The method returns the removed item as a tuple. In this example, a have a dictionary named people with three items, 'Sarah':32 is the last one. When I use…
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…
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…