Category: python-short-tutorial
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….
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?…
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…
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….
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
Python | Create a class that takes 2 parameters, print both parameters
Output: Rakesh 50000Amit 60000
Python | Create a class, create an object of the class, access, and print property value
Output: 10
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….