How do i find duplicates in a list in Python?
-
I need to create a function that find duplicates in a list in python. I want it to return a boolian for True or False and i cant use the set function. It has to use while loops and counters. In the end it will looks something like this except hopefully it will work. birthdaylist = [1,3,2] counter = 0 for index in range(len(birthdaylist)): for indexB in range(len(birthdaylist)): if birthdaylist[index] == birthdaylist[indexB] and birthdaylist[indexB] != counter: print True counter += 1
-
Answer:
Hire Chinese people.
Jhon adams at Yahoo! Answers Visit the source
Other answers
haystack = [1,5,6,3] needle = 6 if needle in haystack: print 'needle found' http://www.php2python.com/wiki/function.in-array/
Related Q & A:
- How can I find work as a writer?Best solution by Yahoo! Answers
- How can I find a list of births in Wiesbaden, Germany?Best solution by Yahoo! Answers
- How do I find out if a business is legitimate?Best solution by bbb.org
- How do I find someone with a yahoo address?Best solution by Yahoo! Answers
- How can I find pictures of a specific unknown person?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.