Category python-top-tutorials

Python literals

Python Literals In computer science, a literal is a symbolic representation of a fixed value in source code. For example, in an assignment statement. x = 10 Here, 10 is a literal value, meaning that 10 is stored directly in…

Python wrapper

Python Encapsulation The principle of encapsulation is one of the main pillars of the object-oriented programming paradigm. Python takes a different approach to implementing encapsulation. As we know, a class is a user-defined object prototype. It defines a set of…

Python URL Handling

Python URL Handling On the internet, resources are identified by URLs (Uniform Resource Locators). The urllib package, bundled with Python’s standard library, provides utilities for working with URLs. It includes the following modules: The urllib.parse module parses URLs into their…

Python Recursion

Python Recursion A function that calls itself is called a recursive function. This approach is useful when a problem defines itself. Although this involves iteration, solving such problems using iterative methods can be tedious. Recursion provides a very concise way…

Python access modifiers

Python Access Modifiers Languages like C++ and Java use access modifiers to restrict access to class members (i.e., variables and methods). These languages have the public, protected, and private keywords to specify access types. A class member is said to…