ShortsFlood Blog

Accessing Database with Python

There are several ways to access a database from Python. One option is to use a database adapter, which is a library that provides a Python interface for communicating with a specific database management system...

Networking in Python 3

There are several modules and libraries in Python 3 that can be used for networking tasks, including: Here’s an example of how to send an HTTP GET request and print the result using the requests...

Python Errors and Exceptions

In Python, errors and exceptions are used to indicate that something has gone wrong while a program is running. Errors and exceptions can be handled in Python using try-except blocks, which allow the program to...

Assert Statements in Python

In Python, an assert statement is a way to check if a condition is true. If the condition is true, the program continues to execute. If the condition is false, the program stops and raises...

Python Property Class

In Python, the property class is a built-in class that allows you to define methods that behave like instance variables. This can be useful for implementing getters, setters, and deleters for instance variables, or for...

Python Ternary Operators

Python’s Ternary operator enables us to determine whether a condition is True or False. This operator is shorter than an entire if-else statement because it just takes up one line of code. Like if-else expressions,...

Features of Python

Python is a high-level, interpreted programming language which has a dynamic type system as well as automatic memory management. It is designed to be easy to read and write, and it emphasizes code readability and...

Unit Testing with Python

A software testing technique known as unit testing involves examining individual pieces of source code, sets of one or more computer programme modules, together with the control data, usage procedures, and operating procedures that go...