# Python List

- 06 October
### How to find index of all occurrences in list in Python

List is a data type in Python. It is used to store multiple values in one variable. If you want to find out how many times a certain element shows up in a list and where – you’ve come to the right place. In this tutorial, we’ll show you how to find index of all […]

- 21 August
### Convert list to matrix in Python

Python provides some in-built data types to stock multiple items in a single variable. A List is one among these built-in data types. However, performing mathematical functions on lists is impossible due to which we need to convert the given lists to matrices or arrays in order to allow the successful performance of certain mathematical […]

- 11 November
### List intersection in python

A list is one of Python’s fundamental in-built data types and clusters several items in a single variable. In this article, we will demonstrate the different ways available to retrieve the list intersection in Python. What is the list intersection in Python? The intersection of two lists returns the elements that are present in both […]

- 31 May
### Sort list alphabetically in Python

💡 Outline You can use sort() method of list to sort list alphabetically in Python [crayon-6285e248d5a93201952466/] In this tutorial, we will discuss different ways to sort a list namely using the sort() function, sorted() function, and implementing the quick sort algorithm. Use of the sort() function to sort list alphabetically in Python. The sort() method […]

- 25 May
### Find common elements in two lists in python

💡 Outline You can first convert first list into set using set() and call intersection() by passing second list as parameter to find common element in two lists in Python. [crayon-6285e248d66a0511105732/] In this tutorial, we will see different methods to find common elements in two lists in python. Using the intersection() Function This is the […]

- 11 April
### Python Remove Newline from List

🎯 Objective: In this article, we will discuss the methods to remove ‘\n’ or newline characters from a list. Introduction In a string, the ‘\n’ represents newline. But having them in your list can be a problem if you want to extract a given string from a list with no escape characters. This means, if […]

- 06 April
### How to Print a Matrix in Python

In this article you will learn "How to print a matrix in Python?"

- 27 February
### [Solved] TypeError: List Indices Must Be Integers Or Slices, Not ‘Str’?

Learn how to fix TypeError: List Indices Must Be Integers Or Slices, Not 'Str' in this article.

- 18 November
### Print Array in Python

In this post, we will see how to print array in Python. As we know that, Python didn’t have an in-built array data type, so we try to use list data type as an array. We can also use the NumPy module for creating NumPy array and apply array operation on it. Now, we will […]