Re: [Tutor] List issues

2014-04-17 Thread Danny Yoo
Hi Gabriel, Try lists of non-numbers as your input, and the error should be a little clearer to see. You should see the conceptual error you're making if not everything in your program is numeric. Try: words = ['hello', 'world', 'hello'] print(words.count(0)) print(words.count('hell

Re: [Tutor] List issues

2014-04-17 Thread Albert-Jan Roskam
  - Original Message - > From: Dave Angel > To: tutor@python.org > Cc: > Sent: Thursday, April 17, 2014 12:03 PM > Subject: Re: [Tutor] List issues > >& quot;Wheeler, Gabriel" Wrote in message: >> > > (not much I could read there. This is

Re: [Tutor] List issues

2014-04-17 Thread Dave Angel
"Wheeler, Gabriel" Wrote in message: > (not much I could read there. This is a text mailing list, so please tell your mail program to send in text mode, not html. Only parts of your code were visible here, and your question not at all. Fortunately, Peter quoted all or most of your message. H

Re: [Tutor] List issues

2014-04-17 Thread Peter Otten
Wheeler, Gabriel wrote: > 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 helps you (and us) a lot if you clearly state the error you are see

[Tutor] List issues

2014-04-17 Thread Wheeler, Gabriel
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 w