Asking the user for input until they give a valid response in Python

Python | Asking the user for input until they give a valid response

In this article, we are going to create a Python program that will be asking the user for input until they give a valid response….

Continue Reading
Python | How to iterate through two lists in parallel?

Python | How to iterate through two lists in parallel?

Iterating on one list is simple and can be done by writing a for loop, but how can we iterate through two lists in parallel?…

Continue Reading
How to sort a dictionary by value in Python?

Python | How to sort a dictionary by value?

Sorting a dictionary by value is a common task in Python and we will see different ways of how can accomplish this task. Also, sorting…

Continue Reading
Remove items from a list while iterating in Python

Python | Remove items from a list while iterating

Many times, it maybe happened that you are trying to process through a list and you don’t want some elements to be part of it….

Continue Reading
How to get dictionary keys as a list in Python?

Python | How to get dictionary keys as a list

In this article, you will learn 6 different methods to get dictionary keys as a list in python. These methods include various Python programming concepts…

Continue Reading
How to represent Enum in Python?

How to represent Enum in Python?

Do you know what Enum means in the programming field and how to represent Enum in Python? Let’s clear all of Enum today. Enum short…

Continue Reading

5 methods | Flatten a list of lists | Convert nested list into a single list in Python

You might often want to Flatten a list of lists or convert a list of lists into a single or tuple. For eg., you might…

Continue Reading
What does if "__name__" == "__main__" do in Python?

What does if __name__ == __main__ do in Python?

Introduction Most of us have come across the if __name__ == “__main__” in Python while doing a program or we specifically write this function while…

Continue Reading

Python | CRUD operations in MongoDB

Today in this article, we will talk about some operations that can be performed on the database using the queries of MongoDB. In this article…

Continue Reading
Create your own ChatGPT with Python

Create your own ChatGPT with Python

ChatGPT is a product of openai, currently ChatGPT is the most famous product of openai but there are many other products. In this article, we…

Continue Reading
Filter List in Python 10 methods

Filter List in Python | 10 methods

Filter List in Python is the process of selecting specific items from a list that meet certain criteria. This is a task that you will…

Continue Reading
Radha Krishna using Python Turtle

Radha Krishna using Python Turtle

Hello friends, in this article, we will learn to draw a simple drawing of Radha Krishna using Python Turtle. Please share if you like. Image…

Continue Reading
Yield Keyword in Python

Yield Keyword in Python

In this tutorial, we are going to learn about the Yield keyword in Python. It works like a return statement we used in functions. The…

Continue Reading
Python Programming Examples Fundamental Programs in Python

Python Programming Examples | Fundamental Programs in Python

Python is a popular, widely-used programming language and easy to learn for beginners because of its short syntax and readability, and learning to code in…

Continue Reading

Python | Delete object of a class

Output: Rakesh 50000 Amit 60000 Rakesh 50000 Traceback (most recent call last): File “C:\CopyAssignment.py”, line 14, in <module> print(obj2.name, obj2.salary) NameError: name ‘obj2’ is not…

Continue Reading

Python | Modify properties of objects 

Output: Amit 60000

Continue Reading

Python classmethod

Output: Your numbers-> 88

Continue Reading

Python | Create a class that takes 2 parameters, print both parameters

Output: Rakesh 50000Amit 60000

Continue Reading

Python | Create a class, create an object of the class, access, and print property value

Output: 10

Continue Reading

Python | Calculator using lambda

Output: PS C:\CopyAssignment.py” Enter 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Exit Enter choice: ds Enter integer values only! Enter 1. Addition 2….

Continue Reading