On Sun, Aug 25, 2013 at 2:03 AM, Chris Angelico <ros...@gmail.com> wrote: > On Sun, Aug 25, 2013 at 3:50 PM, <sahil301...@gmail.com> wrote: >> NOTE: NO INBUILT FUNCTION BE USED. Thank you in advance.
You don't make it easy to help you with your homework by leaving out information about what you have learned so far, and perhaps what you have tried that doesn't work Here are some hints: Do you know what the any and all functions do in python? Do you know about list comprehensions or how to write a for loop that iterates over all of the values in a list? If you know about that stuff, think how those skills could be used to solve your problem. This problem is so completely contrived that without knowing the course of your study (what you have learned about python programming so far) it is really useless to try to guess an acceptable answer. Let me suggest you discuss this with your classmates if possible. -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list