Python max()

Introduction Python provides the max() function to find the maximum (or largest) element among a group of values.This function is built-in and you can find additional information reading the official Python documentation. In the next sections we will see in detail how to use the max() function with examples. Are you curious to find out …

Python max() Read More »

Python CSV

Introduction This post will help you configure your environment to write a Python program whose purpose is to read or write a CSV file. In your life as a developer, you will surely have to write or read a CSV file.A comma-separated values (CSV) file is a simple text file that uses commas to separate …

Python CSV Read More »

Linux ls command

Introduction The Linux ls command is one of the basic commands and it is used to list information about files and sub-directories of the working directory (by default).While this command is pretty simple to use, this post tells you how to best use all of its parameters. Linux ls command The ls command allows you …

Linux ls command Read More »

Linux cd command

Introduction The Linux cd command is one of the basic commands and allows you to change directory.While this command is pretty simple to use, this post tells you how to best use all of its parameters. In the next sections we will start to describe the difference between absolute and relative path and then we …

Linux cd command Read More »

Python if else statement

Introduction The if – else statement is a fundamental construct in Python and in all other programming languages.Using them is it possible to execute a code only under specific conditions. This post presents the simple if, but also the if else, and if elif else.Last but not least we will see also the nested if …

Python if else statement Read More »

Python virtual environment

Introduction A virtual environment (or venv) is an isolated python environment in which you can use a specific Python version and install packages. At this point you may ask: Why should I create a virtualenv since I can already install everything I need? Imagine running several projects and maybe each of them requires a different …

Python virtual environment Read More »

django select_related

Introduction The Django select_related method allows you to speed up your querysets and therefore your application.In this post, I’ll show you how you can minimize database accesses and thus maximize the speed of your Django app. To learn how to use the select_related method we will see a very clear example. We will start from …

django select_related Read More »