- 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
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/644268/profile/60_1472572-1682333965.jpeg)
162 Views
Converting a list into a string One method for converting a list into a string is to iterate through all the items of a list and concatenate them into an empty string. Example lis=["I", "want", "cheese", "cake"] str="" for i in lis: str=str+i str=str+" " print(str) Output I want cheese cake Using Join Function Join is an in-built function in python which is used for joining the items of an iterable object (ex: list) using a separator which will be specified by the user. We can use the join ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/644268/profile/60_1472572-1682333965.jpeg)
1K+ Views
Linked list is used for storing the data in non-contiguous memory locations. The nodes containing the data items are linked using pointers. Each node consists of two fields. The first field is used for storing the data and the second field contains the link to the next node. Brute Force Technique To find the middle element of a linked list, the brute force technique is to find out the length of the linked list by iterating the entire linked list till NULL is encountered and then the length is divided by 2 to get the index of the middle element. ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/644268/profile/60_1472572-1682333965.jpeg)
2K+ Views
In python, collections are the containers used for storing the data. The built-in data structures in python are tuples, lists, sets and dictionaries. The collections class will provide additional data structures apart from the built-in data structures. Some of the data structures in the ‘collections’ module − Counter namedTuple orderedDict defaultDict Deque chainMap Counter It is the type of collection in which the elements will be stored as dictionary keys and the counts will be stored as dictionary values. Whenever you want to calculate the frequency of any item in a list, traditionally you would use a ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/644268/profile/60_1472572-1682333965.jpeg)
472 Views
What is a Linked List When data is not stored in continuous memory locations, it takes a lot of time to search all the memory locations to get the required data. To prevent this, we use Linked Lists. A linked list in Python is a data structure that stores items in an ordered sequence. It consists of nodes, where each node contains the item and a reference to the next node in the list. The first node is known as the head, while the last one is referred to as tail. Linked lists are used for efficient insertion and deletion ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
14K+ Views
Python is an interpreted, object–oriented, high level, programming language with dynamic semantics. Developed by Gudio Van Rossum in 1991. It supports multiple programming paradigms, including structured, object-oriented and functional programming. Before diving deep into the topic let’s first brush up the basic concepts related to the question provided to us. A dictionary is a group of items that are unique, changing, and ordered. Curly brackets are used in dictionary writing, and they contain keys and values: The key name can be used to refer to dictionary objects. Data values are kept as key:value pairs in dictionaries. Ordered and unordered ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
2K+ Views
Dictionaries are known as the collection data types. They store data in the form of key value pair. They are ordered and changeable i.e., they follow a particular sequence and are indexed. We can change the values for a key and therefore it is manipulative or changeable. Dictionaries does not support duplication of data. Each key can have multiple values associated with it but a single value cannot have more than one key. We can use dictionaries to perform numerous operations. The entire mechanism depends upon the stored values. In this article, we will discuss the techniques that can be ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
173 Views
Dictionaries are used to store data values in key:value pairs like maps (which unlike other data types holds only a single value as an element). key:value is provided in dictionaries to make it more effective. Keys are unique. Dictionary key must be unique. So, no duplicate values are allowed in dictionaries. Dictionaries items are ordered, changeable, immutable. Changeable means here is that, we can add or remove items after the dictionaries are created. In this article, we will know about how to find a largest element in a dictionary by using different functions. There are many functions to find ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
12K+ Views
Dictionaries are used to store data values in key:value pairs like maps (which unlike other data types holds only a single value as an element). key:value is provided in dictionaries to make it more effective. Keys are unique. Dictionary key must be unique. So, no duplicate values are allowed in dictionaries. Dictionaries items are ordered, changeable, immutable. Changeable means here is that, we can add or remove items after the dictionaries are created. In this article, we will know about how to search an element in dictionary by using different functions. There are many functions to search an element ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
105 Views
High-level, all-purpose Python is a very well-liked programming language. Python is utilised for cutting-edge software development projects like web development and machine learning applications. In this article, we will be learning various methods for adding elements to a dictionary. What do You Understand From Dictionary in Python? A dictionary in Python stores a key: value pair, unlike other Data Types that only contain a single value as an element. It is used to store data values like a map. The dictionary includes key-value pairs to help it become more efficient. In a dictionary, each key-value pair is separated ... Read More
![Naveen Singh](https://www.tutorialspoint.com/assets/profiles/642945/profile/60_1132213-1682069307.jpg)
672 Views
Dictionaries are used to store data values in key:value pairs like maps (which unlike other data types holds only a single value as an element). key:value is provided in dictionaries to make it more effective. Keys are unique. Dictionary key must be unique. So, no duplicate values are allowed in dictionaries. Dictionaries items are ordered, changeable, immutable. Changeable means here is that, we can add or remove items after the dictionaries are created. In python, dictionaries are defined as object with the data type ‘dict’. The values in dictionaries items can be of any data type like string, integer, Boolean ... Read More