- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10784 Articles for Python
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
540 Views
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. Concatenation of lists is an operation that adds the elements of one list to the end of another. We're discussing list data structures here, therefore we'll join the elements of one list to the end of another. In this article, we will show you how to concatenate lists in python. The following are the different methods to accomplish this task − Using Concatenation(+) Operator Using For Loop(Naive Method) ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
17K+ Views
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. Square brackets are used to denote it, and a comma (, ) is used to divide two things in the list in operator in Python In Python, the in operator determines whether a given value is a constituent element of a sequence such as a string, array, list, or tuple. When used in a condition, the statement returns a Boolean result of True or False. The statement returns True ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
13K+ Views
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array Repetition Operator(*) A repetition operator is supported by sequence datatypes (both mutable and immutable). * The repetition operator * creates several copies of that object and joins them together. When used with an integer, * performs multiplication, but when used with a list, tuple, or strings, it performs repetition In this article, we will show you how the * operator works on a list in python. Below are the ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
2K+ Views
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. Square brackets are used to denote it, and a comma (, ) is used to divide two items in the list. In this article, we will show you how to sort the objects and elements in a list using python. Below are the different methods to accomplish this task − Using sort() method Using sorted() method Assume we have taken a list containing some elements. We will ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
2K+ Views
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. In this article, we will show you how to reverse the objects/elements in a list using python. The following are the 4 different methods to accomplish this task − Using built-in reverse() method Using the builtin reversed() method Using Slicing Using For Loop, pop() and append() Functions Assume we have taken a list containing some elements. We will return a new list after reversing all the items ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
46K+ Views
To remove items (elements) from a list in Python, use the list functions clear(), pop(), and remove(). You can also delete items with the del statement by specifying a position or range with an index or slice. In this article, we will show you how to remove an object/element from a list using Python. The following are the 4 different methods to accomplish this task − Using remove() method Using del keyword Using pop() method Using clear() method Assume we have taken a list containing some elements. We will return a resultant list after removing the given item ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
33K+ Views
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. In this article, we will show you how to insert an item/object in a list at a given position using python. − Insert an item at a specific position in a list Insert an item at the first position in the list Insert an item at the last/end position in the list Assume we have taken a list containing some elements. We will insert an object in ... Read More
![Vikram Chiluka](https://www.tutorialspoint.com/assets/profiles/495654/profile/60_4081994-1659334126.jpg)
4K+ Views
In this article, we will show you how to find the index of an object in a given input list using python. Below are the 3 different methods to accomplish this task − Using index() method Using For Loop Using List comprehension and enumerate() Function Assume we have taken a list containing some elements. We will return the index of a specified object in a given input list. Method 1: Using index() method The index() function in Python allows you to find the index position of an element or item within a string of characters or a list ... Read More
![Pranav Indukuri](https://www.tutorialspoint.com/assets/profiles/512605/profile/60_2168928-1662357840.jpeg)
4K+ Views
List is one of the most commonly used data structures provided by python. List is a data structure in python that is mutable and has an ordered sequence of elements. Following is a list of integer values − Example Following is a list of integer values. lis= [1, 2, 7, 5, 9, 1, 4, 8, 10, 1] print(lis) Output If you execute the above snippet, it produces the following output. [1, 2, 7, 5, 9, 1, 4, 8, 10, 1] In this article, we will discuss how to find the total count of occurrences of an object in ... Read More
![Pranav Indukuri](https://www.tutorialspoint.com/assets/profiles/512605/profile/60_2168928-1662357840.jpeg)
16K+ Views
List is one of the most commonly used data structures provided by python. List is a data structure in Python that is mutable and has an ordered sequence of elements. Following is a list of integer values Example Following is a list of integer values. lis= [11, 22, 33, 44, 55] print(lis) Output If you execute the above snippet, it produces the following output. [11, 22, 33, 44, 55] In this article, we will discuss how to add objects to a list and the different ways to add objects such as append(), insert(), and extend() methods in Python. ... Read More