- 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
Pradeep Elance has Published 445 Articles
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
898 Views
We have a list of tuple. We are required to find out that tuple which was maximum value in it. But in case more than one tuple has same value we need the first tuple which has maximum value.With itemgetter and maxWith itemgetter(1) we get all the value from index ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
796 Views
We have a list whose elements are dictionaries. We need to flatten it to get a single dictionary where all these list elements are present as key-value pairs.With for and updateWe take an empty dictionary and add elements to it by reading the elements from the list. The addition of ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
379 Views
In this article we are required to find the first occurring non-zero number in a given list of numbers.With enumerate and nextWe sue enumerate to get the list of all the elements and then apply the next function to get the first non zero element.Example Live DemolistA = [0, 0, 13, ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
528 Views
Given a list of strings, lets find out the first non-empty element. The challenge is – there may be one, two or many number of empty strings in the beginning of the list and we have to dynamically find out the first non-empty string.With nextWe apply the next function to ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
355 Views
We are given a list whose elements are integers. We are required to find the relative order which means if they are sorted in ascending order then we need to find index of their positions.With sorted and indexWe first sort the entire list and then find out the index of ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
181 Views
In this article we will find out if all the tuples in a given list are of same length.With lenWe will use len function and compare its result to a given value which we are validating. If the values are equal then we consider them as same length else not.Example Live ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
175 Views
We have a list of tuples. In it we are required to find the top k frequent element. If k is 3 we are required to find the top three elements from the tuples inside the list.With defaultdictWe put the the elements into a dictionary container using defaultdict. Then find ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
534 Views
A list can have tuples as its elements. In this article we will learn how to identify those tuples which contain a specific search element which is a string.With in and conditionWe can design a follow with in condition. After in we can mention the condition or a combination of ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
523 Views
A list can contain other list as its elements. In this article we are equal to find the sublist with maximum value which are present in a given list.With max and lambdaThe max and the Lambda function can together be used to give that sublist which has the maximum value.Example Live ... Read More
![Pradeep Elance](https://www.tutorialspoint.com/assets/profiles/121076/profile/60_44312-1565945237.jpg)
Pradeep Elance
217 Views
In this article we are required to find that number from the list which occurs odd number of times in the given list. We are also required to use the Lambda function and the reduce function.We design a function where the reduce function is used by applying the Lambda function ... Read More