Comments in Python

The purpose of comments is to explain what is happening in the code. Comments are written along with your code but do not influence your program flow. When you work by yourself, maybe comments don’t feel like something you should…

Conditionals in Python

Conditionals are one of the cornerstones of any programming language. They allow you to control the program flow according to specific conditions you can check. The if statement The way you implement a conditional is through the if statement. The…

Booleans in Python

As far as data types go, the Boolean type is by far the simpler one. A boolean typed variable is either Trueor False. Notice the capitalization, that is how you should write these values in Python, not "true" or "false".…

Variables in Python

In any program, you need to store and manipulate data to create a flow or some specific logic. That’s what variables are for. You can have a variable to store a name, another one to store the age of a…

Python Data Types

To store data in Python, you need some variable, and every variable has its type depending on the value of the data stored. Python has dynamic typing, which means you don’t have to explicitly declare the type of your variable,…

Python Lambda Functions

A Python lambda function can only have one expression and no multiple lines. It is supposed to make it easier to create some small logic in one line instead of a whole function as it is usually done. Lambda functions…

Command Line Arguments in Python

The best way to use command line arguments on your Python script is by using the argparse library. Step By Step First import the library import argparse The initialize a parser object parser = argparse.ArgumentParser(description='Find out the number of World…

File Handling in Python

In this tutorial, I will show how to handle files in Python. Create, write, read, append and close files. File create First things first, create! We are going to use the open() function. This function opens a file and returns…

Monolithic vs Microservices: pros and cons

What is a Monolith? A Monolithic system is designed to produce one, self-contained, deliverable. This deliverable will then be deployed in a whole bunch of different environments to be tested, validated, and finally, go to production and serve its users.…