Sarika Singh has Published 72 Articles

How to return a JSON object from a Python function in Tkinter?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:50:53

2K+ Views

JavaScript Object Notation, or JSON is a simple data format that is used to exchange data between many different languages. It is simple to read for people and simple for computers to parse. Python reads JSON text as a quoted-string that contains the value in each key-value mapping. Once parsed, ... Read More

How to expand tabs in string to multiple spaces in Python?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:49:30

2K+ Views

The handling of white spaces between strings is managed effectively in Python. In this article, we'll examine the methods to provide a space in the string when we are unsure of how much space is necessary. Using string expandtabs() method A built-in method in Python called String expandtabs() is used ... Read More

Python program to sort a tuple by its float element

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:33:43

1K+ Views

This article will demonstrate how write a Python program to sort a tuple (made up of float elements) using its float elements. Here, we'll look at both how to sort using the in-built sorted() function and how to sort using the in-place method of sorting. Input-Output Scenarios Following is an ... Read More

Python Program to find mirror characters in a string

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:25:19

3K+ Views

This article teaches you how to write a python program to find mirror characters in a string. Let us first understand what mirror characters in a string are. Two identical alphabetically positioned characters, one from the front and the other from the back, are known as mirror characters. For example, ... Read More

Python Program to check if two given matrices are identical

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:22:21

3K+ Views

Matrix refers to a collection of numbers arranged in rows and columns to form a rectangular array. The numbers make up the matrix's entries, or elements. We need to create a Python function to determine whether two given matrices are identical. In other words, we say that two matrices are ... Read More

How to get the class name of an instance in Python?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:17:55

5K+ Views

The object-oriented procedural programming, including the ideas of classes and objects, is well supported by Python. It offers a crystal-clear program structure and simple code modification. The code can be reused and offers many benefits of abstractions, encapsulation, and polymorphism due to the class's shareability. A Python class is a ... Read More

How to install a Python Module?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:14:29

13K+ Views

A file containing Python definitions and statements is referred to as a module. A module is a file that contains Python code; an “Program.py” file would be a module with the name “Program”. We utilise modules to divide complicated programs into smaller, more manageable pieces. Code reuse is also possible ... Read More

How to find which Python modules are being imported from a package?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:12:35

10K+ Views

A file containing Python code, definitions of statements, functions, or classes is known as a module. A module with the name "module" that we will construct is a file named module.py. To break down complex programmes into smaller, easier-to-understand parts, we use modules. Code reuse is another benefit of modules. ... Read More

How to delete an installed module in Python?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:10:24

34K+ Views

You can uninstall a Python package on Windows by opening the Windows Command Prompt and entering the following command − pip uninstall module_name Uninstalling a package using pip Python's package manager is called PIP. In other words, it is a tool that enables us to install Python packages and ... Read More

How I can dynamically import Python module?

Sarika Singh

Sarika Singh

Updated on 23-Nov-2022 07:08:40

13K+ Views

Python has a capability that allows you to build and store classes and functions for later usage. A module is the name of the file that has these collections of methods and classes. A module may contain more modules. Let’s consider the following example to import multiple modules at once ... Read More

Advertisements