How to Compress a folder with tar

The process of compressing files reduces the amount of size of files and helps deliver email attachments or transfer these files efficiently. We can also use the compressed files and folders for backup, and use it at the time of need. Ubuntu 22.04 provides the tar...

How do I run a Python function in terminal

Python functions are the blocks of code that perform a specific task. Functions provide the facility of modular programming. You can code the function once and use that function many times. You can use the Python-predefined functions as well as user-defined functions....

How do I correctly clean up a Python object?

Cleaning up the Python object can be useful for memory management and smooth execution of the program. The objects can be cleaned with the destructors. Destructors are more common in C++ language than in Python as it contains a garbage collector intended to manage the...

Convert Hexadecimal to Decimal in Python

A programmer has to work with different number systems. Different formats are useful for different reasons. Hexadecimal numbers are useful in the front end when working with the CSS properties or when we are working with IP or memory addresses. Decimal numbers are...

Extracting Digits from String in Python

Converting Python objects to JSON can be beneficial in data sharing between systems that do not have an inherent Python language. A lot of programming languages can read and write JSON. This makes it a good choice for the data interchange. What is JSON? You might also...