Re: Checking homogeneity of Array using List in Python

2013-08-27 Thread Neil Cerutti
On 2013-08-26, Joshua Landau wrote: > On 26 August 2013 14:49, Neil Cerutti wrote: >> On 2013-08-25, sahil301...@gmail.com wrote: >>> >>> eg. my input is ['1', ' ', 'asdasd231231', '1213asasd', '43242'] >>> I want it to be interpreted as: >>> [1, [None], [None], [None], 43242] >>> >>> NOTE: NO I

Re: Checking homogeneity of Array using List in Python

2013-08-26 Thread Joshua Landau
On 26 August 2013 14:49, Neil Cerutti wrote: > On 2013-08-25, sahil301...@gmail.com wrote: >> >> eg. my input is ['1', ' ', 'asdasd231231', '1213asasd', '43242'] >> I want it to be interpreted as: >> [1, [None], [None], [None], 43242] >> >> NOTE: NO INBUILT FUNCTION BE USED. > > Impossible. I thi

Re: Checking homogeneity of Array using List in Python

2013-08-26 Thread Neil Cerutti
On 2013-08-25, sahil301...@gmail.com wrote: > I am unable to check homogeneity of Array. > I have take Array type Int to be default for my code. > > Instead of getting Error on NON-INT Values. > I want to take input as string. > Then check if all input is in (0-9) form, I typecast it into int and

Re: Checking homogeneity of Array using List in Python

2013-08-25 Thread Dave Angel
sahil301...@gmail.com wrote: > I am unable to check homogeneity of Array. > I have take Array type Int to be default for my code. > > Instead of getting Error on NON-INT Values. But none of them below are int values. > I want to take input as string. > Then check if all input is in (0-9) form, I

Re: Checking homogeneity of Array using List in Python

2013-08-25 Thread Joel Goldstick
On Sun, Aug 25, 2013 at 2:03 AM, Chris Angelico wrote: > On Sun, Aug 25, 2013 at 3:50 PM, 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

Re: Checking homogeneity of Array using List in Python

2013-08-24 Thread Chris Angelico
On Sun, Aug 25, 2013 at 3:50 PM, wrote: > NOTE: NO INBUILT FUNCTION BE USED. Thank you in advance. You'll have to do your own homework, then. Python strongly favours the use of inbuilt functions. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Checking homogeneity of Array using List in Python

2013-08-24 Thread sahil301290
I am unable to check homogeneity of Array. I have take Array type Int to be default for my code. Instead of getting Error on NON-INT Values. I want to take input as string. Then check if all input is in (0-9) form, I typecast it into int and Accept. Else, I would like to skip that input. eg. my i