A Blog on AI, Flutter, PHP and more

  • Operators Python: Comparison, Logical and Identity

    In the last section we have seen arithmetic operators in Python. However we didn’t discuss Arithmetic Operators Python precedence. Therefore that should be the first task that we should address. First of all, what is arithmetic precedence? When we have many operations at our hands, such as the following example. What will be the value…

  • What are operators in Python

    Why do we use operators in Python? For one reason of course. To perform various kinds of operations on variables. Arithmetic operations like addition, subtraction, multiplication or division are nothing new to us. Right?  As a result, we know how to use those operators. However, a programming language needs a lot more than that.  If…

  • How do you show Python output

    We can show Python output in many ways. In other words, there are many ways that we can adopt to show the output in Python. In this section, we will see all the alleys and backstreets to display the output. Firstly, let us clear a basic point in mathematics and programming.  A function primarily handles…

  • How Python Dictionary functions work

    In our previous section, we have seen a few examples of Python dictionary functions. In this section we will discuss more. Let’s start with the popitem() method. This method removes and returns the last key, value pair inserted into the Python Dictionary. However, the popitem() doesn’t take any arguments. Let’s take a look at one…

  • What are Python dictionary functions

    We have learned how a Python dictionary works. However, we use Python dictionary functions without knowing that they are built-in methods. In the previous sections we have seen how the  Python Set and Dictionary belong to the collections or data structures. We have also discussed lists and tuples. However, lists and tuples differ in nature.…

  • Dictionary functions in Python

    Dictionary functions are a few built-in methods in Python. Using these functions we can do many operations on a dictionary. However, in the previous section we have seen how a python dictionary behaves as a mutable data structure. But promised to show the delete method in the later section. Therefore, before discussing the dictionary functions…

  • Dictionary is mutable in python

    A Dictionary is mutable in Python. What does that mean? In short, it means we can use the concept of CRUD with a dictionary. Let’s clarify the concept a little bit. Actually it’s simple. CRUD represents four words – C for Create, R for retrieve, U for update, and D for delete. In the coming…

  • Python Set and Dictionary

    Python Set and Dictionary belong to the collections or data structures. We have discussed lists and tuples before. With reference to the previous discussion we have also seen how lists and tuples differ in nature. The Python Set and Dictionary are also different.  Firstly, Set is an unordered collection of unique items.  Remember, unique items.…

  • Python collections comparison

    In our previous discussion, we have seen one of the most important collections List. Now we can go through python collections comparison. We’ve also seen how we can change the value of a list and change the Python collection. However, in some cases, we need to keep the value write-protected.  In short, we don’t want…

  • What is the need of Python collections?

    Without the Python collections we cannot handle the big data. In short, the data structure or collections in python is super important. There are four types of Python collections. In this section we will try to understand List. One of the most used data types in collections is the List. We have discussed data types…

  • What are data types in Python?

    We have already seen data types in Python. But in this section we will dig deep and learn the topic in depth. Now in many programming languages, we explicitly mention the data type. We call them Strongly typed, or Statically typed languages. On the other hand, in Python it is not mandatory at all. We can…

  • What are literals in Python?

    In our previous discussion we have seen how we can assign value to a variable. We refer to that value as literals in Python. In other words, literals refer to raw data. As a result, there are different types of literals in Python.  Let’s start with numeric literals which are nothing but a decimal literal,…

  • What are variables in Python

    Consider variables in Python as containers that contain some data. It could be integer, string or boolean. At the same time, whenever a Python interpreter sees a variable it considers it as a named-location. In reality a variable stores data in the memory.  However, at the same time it tells the interpreter that this is…

  • What is Python Docstring?

    First of all let’s put one important concept in order. What is Python docstring? Is it the same as Python comments? The answer is no. We have discussed the role of Python comments before. Sometimes beginners may find them the same.  Because for multi-line Python comments we use three single quotes – (‘’’ comments can…

  • What are Python Comments

    Python Comments and Docstrings are an essential part of building any type of Python programming. We’ll learn in a minute. While we write any type of Python program, both comments and docstrings play an important role. However, they are not the same. On the contrary, they are different. What is the difference, we will discuss…

  • Statement and Indentation in Python

    Statement and indentation in Python are important concepts that a beginner should know at the very beginning. In this section, we will see how it works.  If you are new to Python, please visit the previous sections, where we have discussed keywords and identifiers. Besides that, we have also discussed how to start learning Python.…

  • What are keywords and identifiers in Python?

    Keywords and identifiers in Python separately refer to two different types of concepts. Therefore, don’t get confused. What are keywords in Python? Firstly, they are reserved words that we use for special purposes.  We’ll see in a minute what they are and how they work. Secondly, we cannot use keywords as names given to any…

  • How to learn Python?

    Every beginner asks this question – how to learn Python? Answer? It’s easy to learn Python. We’ll find that in the coming sections. How easy is it to learn?  Well, in a step by step guide we will see how easy it is.  Since this is the first step to start Python, we don’t have…

  • What is a decorator in Python?

    The decorator in Python is an interesting feature. What does it do and how does it work? We’ll discuss it in this section. Firstly, the decorator is a function itself.  Secondly, it takes in a function and modifies that function and after that returns it. While modifying, the decorator might add some functionality to the…

  • What are special parameters in Python?

    We can pass arguments or parameters to a Python function in two ways. That is why we’re discussing special parameters in Python. Why do we term these parameters special?  Let’s see. Firstly, we can pass an argument or parameter to the python function by position.  Secondly, we can pass it by keyword. And in that…

  • Python module introduction

    When we talk about python module, we think of default python libraries. Right? But it’s not true in every sense. Actually when we think of keeping our python code restoring its value we think of python modules. What does that mean? Let’s think of a Python interpreter.  When we close the interpreter, what do we…

Get Books in Leanpub