Tutorials on Linux, Programming & Technology

Python Convert Dictionary to JSON-01

Python | Convert Dictionary to JSON

The “json.dumps()” function of the json module converts the value of the dictionary into JSON. The value is stored in “keys” and then converted into JSON.

How to Install RPM Packages on Ubuntu 22.04

How to Install RPM Packages on Ubuntu 22.04

To install the RPM Packages on Ubuntu 22.04, use the “alien” program with its “-i” option or convert the RPM file into a Debian file and then install it using “dpkg”.

Python Logical AND Operator | Explained

Python Logical AND Operator | Explained

The logical “and” operator returns the boolean value “True” when both of the operands are “True”. This operator checks multiple conditions at one time.

Memory Error in Python

Memory Error in Python

The causes and solutions of python memory errors are discussed and how python memory error occurs due to the use of 32-Bit python installation.

Read a Text File

How to Read a Text File in Python

The “read()” function, “read(n)” with parameter value, and “readline()” function is used to read a text file completely, specifically and line by line.

How To Install dpkg on Ubuntu 22.04-01

How to Install dpkg on Ubuntu 22.04

To install the dpkg on Ubuntu 22.04, run the command “sudo apt install dpkg”. You can use the “-i”/“-r” options to install/remove packages using dpkg.

How to Use the Python If Not Statement

How to Use the Python If Not Statement?

The “If Not” statement is used to execute the statements of a program when the condition is “False”. The “If Not” statement is used to check any empty iterable.

How to Generate Random Numbers in Python

How to Generate Random Numbers in Python?

In Python, the random module function “randint()”, “random() method”, “random.sample()” and “for loop with randint()” functions are used to generate random numbers.

For Loop in Python Explained

For Loop in Python | Explained

In Python, the “for loop” function iterates over the sequence of elements of different iterable objects like tuples, strings, and lists.

How to install emacs on Ubuntu 22.04

How to Install Emacs on Ubuntu 22.04

Emacs can be installed from snapcraft or flathub, but the convenient method is with the execution of “sudo apt install emacs -y” on Ubuntu 22.04.

How to Install glibc on Ubuntu 22.04

How to Install glibc on Ubuntu 22.04

Ubuntu 22.04 users can install glibc package by executing the command “sudo apt install glibc-source”. The installation method is described here in detail.

How to Install Make on Ubuntu 22.04

How to Install CMake on Ubuntu 22.04

The most convenient method is by running the command “sudo snap install cmake –classic” on Ubuntu 22.04. However, other methods are also explained.

How to Get Class Name in Python

How to Get Class Name in Python

In Python, the class name is obtained by different methods like “type().__name__”, and “__class__.__name__” and “nested “__qualname__” method.

Python Division Operators Explained

Python Division Operators | Explained

The division operators divide two input “float” or “integer” data type numbers using “/” and “//” operators. Both operators provide different types of answers.

Install OpenOffice in Ubuntu 22.04

Install OpenOffice in Ubuntu 22.04

To install OpenOffice on Ubuntu 22.04, install the JDK. Then download and unzip setup file, move to the “en-US/DEBS/” directory, and install the “.deb” package.

How to Install Zsh in Ubuntu 22.04

How to Install Zsh in Ubuntu 22.04

To install Zsh in Ubuntu 22.04, execute the command “sudo apt install zsh -y” and to switch between the shells, use the “exec [shell name]”