Python | Return multiple values from functions >>> def A(): return 2, 3, 4 >>> a, b, c = A() >>> print(a, b, c) 2 3 4  

Last updated 4 years ago | 1606 views

Tags:- Python Django

Creating tables in a Microsoft SQL Server (MSSQL) database using Python allows you to automate your database setup and seamlessly integrate backend data structures with your applications. This guide walks you through the process of …

Last updated 1 year, 4 months ago | 1591 views

Tags:- Python MSSQL

 Python | In-place swapping of two numbers >>> a, b = 10, 20 >>> print(a, b) 10 20 >>> a, b = b, a >>> print(a, b) 20 10  

Last updated 4 years ago | 1558 views

Tags:- Python Django

Python | filter(), map(), and reduce() Functions filter()  function accepts two arguments, a function and an iterable, where each element of the iterable is filtered through the function to test if the item is accepted or …

Last updated 4 years, 3 months ago | 1558 views

Tags:- Python

Python | vars(), dir() and help()  The vars() function returns the __dict__ attribute of an object. The dir() function returns all properties and methods of the specified object, without the values. The help() function is used to display …

Last updated 4 years, 3 months ago | 1547 views

Tags:- Python

No. However, Abstract Base Classes (ABCs) are a feature from the abc module that let us declare what methods subclasses should implement. Python supports this module since version 2.7.

Last updated 4 years, 3 months ago | 1545 views

Tags:- Python

Once you’ve inserted data into your Microsoft SQL Server (MSSQL) database, the next step is retrieving it. Python, combined with the pyodbc library, makes it easy to execute SQL SELECT queries and fetch results for …

Last updated 1 year, 4 months ago | 1535 views

Tags:- Python MSSQL

Python | Difference between @staticmethod and @classmethod A staticmethod is a method that knows nothing about the class or the instance it was called on. It just gets the arguments that were passed, no implicit first argument. …

Last updated 4 years, 3 months ago | 1525 views

Tags:- Python

Introduction: Why PHP Comments Matter Writing code that works is great—but writing code that’s easy to understand is better. This is where PHP comments come in. Comments are crucial for explaining logic, documenting functions, and …

Last updated 1 year, 2 months ago | 1504 views

Tags:- PHP

In Django, static files are the files that serve the purpose of additional purposes such as images, CSS, or JavaScript files. Static files managed by “django.contrib.staticfiles”. There are three main things to  set up static …

Last updated 4 years ago | 1497 views

Tags:- Django

Introduction: Why Token Refreshing Matters JWT (JSON Web Tokens) are commonly used for securing APIs in modern Django applications, especially with frontend frameworks like React, Vue, or mobile apps. However, access tokens expire quickly (usually …

Last updated 1 year, 3 months ago | 1488 views

Tags:- Python Django DRF

Introduction: Why Swagger API Docs Matter in Django Great code deserves great documentation—especially for APIs. When building REST APIs with Django REST Framework (DRF), clear and up-to-date documentation is critical for: Frontend developers and third-party …

Last updated 1 year, 3 months ago | 1485 views

Tags:- Python Django DRF

Django | NoSQL NoSQL basically stands for “not only SQL”. This is considered an alternative to the traditional RDBMS or relational Databases. Officially, Django does not support NoSQL databases. However, there are third-party projects, such as …

Last updated 4 years, 3 months ago | 1452 views

Tags:- Django

Introduction: Why Use drf-spectacular for API Documentation? Good API documentation is not a luxury—it's a necessity. Whether you're developing APIs for internal tools or exposing them to third-party consumers, your documentation: Saves time debugging API …

Last updated 1 year, 3 months ago | 1418 views

Tags:- Python Django DRF

In data manipulation, machine learning, or statistics, it's often necessary to shuffle data—either for splitting datasets, randomizing the order of records, or avoiding bias. NumPy’s random.permutation() function is an essential tool for this. This article …

Last updated 1 year, 3 months ago | 1379 views

Tags:- Python NumPy