Category: New Python tutorial

python tutorials and learn python

Created with Sketch.

Python bool

Python bool Summary: in this tutorial, you’ll have a deep understanding of the Python bool class and how to handle boolean values effectively. Introduction to the Python bool class To represent boolean values including True and False, Python uses the built-in bool class. The bool class is the subclass of the int class. It means…
Read more

Python Modulo

Python Modulo Summary: in this tutorial, you’ll learn about the Python modulo operator (%) and how to use it effectively. Introduction to the Python modulo operator Python uses the percent sign (%) as the modulo operator. The modulo operator always satisfies the following equation: N = D * ( N // D) + (N %…
Read more

Python Floor Division

Python Floor Division Summary: in this tutorial, you’ll learn about Python floor division operator (//) or mod. Introduction to Python floor division Suppose you have a division of two integers: 101 / 4   In this division, 101 is called a numerator (N) and 4 is called a denominator (D). The integer division 101 /…
Read more

Python Integers

Python Integers Summary: in this tutorial, you’ll learn about Python integers and how Python stores integers in the memory. Integers are whole numbers that include negative numbers, zero, and positive numbers such as -3, -2, -1, 0, 1, 2, 3. Python uses the class int to represent all integer numbers. All integers are objects. How…
Read more

Python None

Python None Summary: in this tutorial, you’ll learn about Python None and how to use it properly in your code. Introduction to the Python None value In Python, None is a special object of the NoneType class. To use the None value, you specify the None as follows: None Code language: Python (python) If you…
Read more

Python is operator

Python is operator Summary: in this tutorial, you’ll learn about the Python is operator and the differences between the is operator and equality (==) operators. Introduction to Python is the operator Python is the operator compares two variables and returns True if they reference the same object. If the two variables reference different objects, the…
Read more

Python Mutable and Immutable

Python Mutable and Immutable Summary: in this tutorial, you’ll learn about the mutable and immutable in Python. Introduction to mutable and immutable in Python In Python, everything is an object. An object has its own internal state. Some objects allow you to change their internal state and others don’t. An object whose internal state can…
Read more

Dynamic Typing in Python

Dynamic Typing in Python Summary: in this tutorial, you’ll learn about dynamic typing in Python and how it works. Introduction to dynamic typing in Python In some programming languages such as Java or C#, when declaring a variable, you need to specify a data type for it. For example, the following defines a variable in…
Read more

Python Garbage Collection

Python Garbage Collection Summary: in this tutorial, you’ll learn how Python garbage collection works and how to interact with the garbage collector programmatically. Introduction to Python garbage collection In C/C++, you’re fully responsible for managing the memory of the program. However, in Python, you don’t have to manage the memory yourself because Python does it…
Read more

Python References

Python References Summary: in this tutorial, you’ll have a good understanding of Python references and referencing counting. Introduction to Python references In Python, a variable is not a label of a value like you may think. Instead, A variable references an object that holds a value. In other words, variables are references. The following example…
Read more