Posts by Ria Sehgal

Author Biographical Info: Not available

How to extract numbers from a string in Python

By Ria Sehgal

In this Python tutorial, we gonna learn how to extract numbers from string. A string is one of the main data types used in Python. It includes characters enclosed within ” &#.... Read More

Find Second Largest value in a dictionary in Python

By Ria Sehgal

In this tutorial, we will learn how to find the second largest value or number in a dictionary in Python. Dictionaries are one of the main data types in Python others than lists, s.... Read More

Virtual Environments in Python

By Ria Sehgal

This tutorial topic is: Virtual Environments in Python. We will learn how to Create Virtual Environments. A virtual environment is a space in which the interpreter, libraries, and .... Read More

Get a Substring From a String in Python

By Ria Sehgal

In this tutorial, we are going to learn how to get substring from a string in Python. Strings are one of the major data types in Python. They include characters, symbols, integers .... Read More

Python setattr() Function

By Ria Sehgal

Python has lots of in-built methods to access, modify and perform other operations on different data types. One of these built-in methods is setattr(). It is used to assign a value.... Read More

Python id() function

By Ria Sehgal

Python has many datatypes. Some of them are strings, integers, lists, sets, and dictionaries. When using a function, some of them require certain arguments within the parenthesis. .... Read More

Product of Values of elements in a Dictionary in Python

By Ria Sehgal

A dictionary is a collection of elements with key-value pairs. The values in the elements are accessed with the keys of that element. So let’s start learning: how to find the pro.... Read More

slots in python

By Ria Sehgal

In this tutorial, we will try to understand slots in Python with a simple example. In Python, we use __dict__ function to store the object attributes. This allows setting new attri.... Read More