Hi

Im having trouble completing this function with lists. Im supposed to create a 
function that will let me know if there are repeating elements so I wrote this 
and am not sure where the error lies. It is supposed to count the number of 
times a number appears and if its greater than 1 then it will say True.


#Problem 3

list = [1,2,2,2,3,4]

def duplicate(list):

    for i in range(len[list]):

        if list.count(i) > 1:

            return True


print duplicate(list)



Gabe Wheeler
(512)964-5421
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to