python

python

Python program to find the smallest divisor of a number

This tutorial is to show you how we can find out the smallest divisor of a number in python. Number 'y' is called divisor of number 'x' if 'x/y' is 0. Our program will ask the user to enter a no. It will then find out the lowest divisor of the number.

Read
python

Python program to insert multiple elements to a list at any specific position

In this python programming tutorial, we will learn how to insert multiple elements to a list at a specific position. position

Read
python

Python program to calculate total vowels in a string

In this python programming tutorial, we will learn how to calculate the total number of vowels in a string.

Read
python

Python program to convert Unicode or ASCII value to a character

In this python programming tutorial, we will learn how to convert a Unicode value to its character value. The program will take one Unicode value from the user and it will print the character that it represents.

Read
python

Python program to convert an integer number to octal

Python comes with one built-in method oct() for converting an integer number to octal easily. You need to pass one integer number to this method. It will convert the integer to octal string and returns the value. One thing you should note that the returned octal string is prefixed with 0o. If the parameter value is not a python int, it should define index() method that returns an integer.

Read
python

Python program to print the odd numbers in a given range

In this tutorial, we will learn how to print odd numbers within a given range. The program will ask the user to enter the lower and upper limit of the range. It will then find out all the odd numbers in that range and print them out.

Read
python

Python program to rename a file or directory

In this tutorial, we will learn how to rename a directory or file in python with example.Python has one built-in method called rename that can be used for renaming a file or directory. This method is defined as below..

Read
python

Python program to check if two strings are an anagram or not

In this python programming tutorial, we will learn how to check if two strings are an anagram or not.

Read
python

Python set isdisjoint() explanation with an example

In this tutorial, we will learn about isdisjoint() method of python set with example. isdisjoint() method is used to find out if two sets are disjoint or not. Two sets are called disjoint if they don't have any common elements.

Read
python

Python set discard method explanation with an example

In this tutorial, we will learn about the discard method of python set. The discard method is used to remove a specific element from a set if it is available. The syntax of  the discard method is as below :.

Read