In this python programming tutorial, we will learn how to find out the total sum of all digits of a number. For example, if the number is 123, the program will print 6 as the output. Our program will take the number as input from the user.
ReadThe ljust() word stands for left-justified. It returns a left-justified string of a given width. It uses one specific character called fill character to fill the additional position of the string. The default value of fill character is space.
ReadIn this python programming tutorial, we will learn how to find the intersection of two lists. The program will create two lists by taking the inputs from the user first. It will then find out the intersection of the lists and print out the result.
Readsymmetricdifferenceupdate method is used to find the symmetric difference of two sets in python.
ReadPython program to exchange the first and the last character of a string. We will learn different string slicing ways to do that.
ReadPython list is one of the most frequently used datatypes. A list is used to hold a group of elements. These elements are placed inside a square bracket separated by commas. Python list can hold items of different datatypes e.g. a list can have items of type 'integer', 'float', 'string' etc.
ReadPython program to find the sum of all odd numbers and even numbers in a list. The program will ask the user to enter the size of the list first. Then, it will ask each number to add to the list one by one. Finally, the program will calculate and print out the sum of all odd numbers and even numbers in the list.
ReadA python dictionary is a collection of key-value pairs. All keys in a python dictionary should be different.No two keys can have the same name. But for different keys, we can have the same 'value'. This tutorial is to show you how we can find all keys in a python dictionary with the same value.
ReadIn this python programming tutorial, we will learn how to delete all files with a specific extension in a folder recursively.
ReadRenaming of a directory or file is always required if you are dealing with the filesystem. Note that the filesystem works differently on different platforms. Even if you are developing applications for mobile platforms (Android or iOS), it will be different.
Read