Hafeezul Kareem has Published 328 Articles

string.octdigits in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 07:52:45

161 Views

In this tutorial, we are going to learn about the string.octdigits string.The string octdigits is pre-defined in the string module of the Python3. We can use the octal digits whenever we want in the program by simply accessing it from the string module.Example Live Demo# importing the string module import string ... Read More

String slicing in Python to check if a can become empty by recursive deletion

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 07:50:47

369 Views

In this tutorial, we are going to write a program that will check whether the given string can become empty or not by recursive deletion of chars using slice. Let's see an example to understand it more clearly.Inputstring = "tutorialstutorialspointpoint" sub_string = "tutorialspoint"OutputTrueAfter first iteration tutorialstutorialspointpoint becomes tutorialspoint.After the second ... Read More

SQL using Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 07:01:04

877 Views

In this tutorial, we are going to learn how to use SQL with Python using SQLite database. has a built-in module to connect with SQLite database. We are going to use sqlite3 module to connect Python and SQLite.We have to follow the below steps to connect the SQLite database with ... Read More

Split a string in equal parts (grouper in Python)

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:59:37

361 Views

In this tutorial, we are going to write a program that splits the given string into equal parts. Let's see an example.Inputstring = 'Tutorialspoint' each_part_length = 5OutputTutor ialsp ointXInputstring = 'Tutorialspoint' each_part_length = 6OutputTutori alspoi ntXXXX We are going to use the zip_longest method from the itertools module to achieve ... Read More

Sorted() function in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:58:18

412 Views

In this tutorial, we are going to learn about the sorted() function in Python.The function sorted() is used to sort an iterable in ascending or descending order. We can even sort the list of dictionaries based on different keys and values. Let's get most out of the sorted() function.The sorted() ... Read More

sort() in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:57:44

359 Views

In this tutorial, we are going to learn about the sort method of a list. Let's dive into the tutorial. The method sort is used to sort any list in ascending or descending order. There are many cases of sort method with or without optional parameters.The method sort is an ... Read More

Set update() in Python to do union of n arrays

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:55:48

330 Views

In this tutorial, we are going to write a program that uses set update method to union multiple arrays. And it will return a resultant one-dimension array with all unique values from the arrays.Let's see an example to understand it more clearly.Let's see an example to understand it more clearly.Inputarrays ... Read More

set copy() in python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:54:53

276 Views

In this tutorial, we are going to learn about the copy method set data structure. Let's see it in detail.The method copy is used to get a shallow copy of a set.Let's see different examples to under normal and shallow copy of a set.Normal CopyFollow the below steps and understand ... Read More

set clear() in python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:53:42

3K+ Views

In this tutorial, we are going to learn about the clear method of set data structure. Let's see details about the clear method.The method clear is used to clear all the data from the set data structure. All elements from set will clear. And we will leave with an empty ... Read More

set add() in python

Hafeezul Kareem

Hafeezul Kareem

Updated on 11-Jul-2020 06:51:05

244 Views

In this tutorial, we are going to learn about the add method of set data structure. Let's dive into the tutorial.Set data structure stores unique elements in it. The add method of set data structure takes an element and adds it to the set.Follow the below steps to add a ... Read More

Advertisements