Python program to remove the first occurrence of an item from a list. We will learn how to use the remove() method, pop() method and del operator with example for each.
ReadThis post will show you how id() function works in Python. The id() function is used to get the identity of an object. Learn how this function works with different examples.
ReadHow to change the values of a dictionary in Python. We will learn to use keys and the update method to change Python dictionary values with examples.
ReadLearn how to remove items from a dictionary in Python. This post will show you how to remove single item, delete a dictionary and clear all items from a dictionary.
ReadLearn to find the n middle list elements in Python in 3 different ways. We will learn how to do it by using a loop, by using list slicing and by using user input values in this post.
ReadPython program to convert temperature in celsius to Fahrenheit with user input values. We will learn how to write this program by using a separate method and without using a separate method.
ReadPython program to check if a number is a perfect number or not in 4 different ways. The program will take one number as input from the user and check if it is a perfect number or not.
ReadPython program to print the multiplication table of a number in two different ways. We will learn how to use a for loop and how to use a while loop to print the multiplication table.
ReadPython program to calculate GCD or HCF of two user input numbers. Learn how to do it by using a for loop, by reverse looping and by Euclid's division algorithm.
ReadPython program to check if a number is a Niven or Harshad number or not. The program will take one number as input from the user and print if it is a Niven or Harshad number.
Read